From 0415d0d076e99e163a9e611c0c6d26df420ba539 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 20 Sep 2000 06:41:26 +0000 Subject: [PATCH] (diff-apply-hunk): Jump to the correct line offset in the dry-run case. --- lisp/ChangeLog | 3 +++ lisp/diff-mode.el | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8b5a92b0d56..12bfd8907b5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2000-09-20 Miles Bader + * diff-mode.el (diff-apply-hunk): Jump to the correct line offset + in the dry-run case. + * jka-compr.el (with-auto-compression-mode): New macro. * cus-edit.el (custom-face-tag-face, custom-group-tag-face-1) diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index af8535ad79f..b36500840ce 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -4,7 +4,7 @@ ;; Author: Stefan Monnier ;; Keywords: patch diff -;; Revision: $Id: diff-mode.el,v 1.16 2000/09/19 16:24:30 monnier Exp $ +;; Revision: $Id: diff-mode.el,v 1.17 2000/09/19 16:25:43 monnier Exp $ ;; This file is part of GNU Emacs. @@ -1085,7 +1085,7 @@ was non-nil." ;; fixup POS to reflect the hunk line offset (goto-char pos) - (forward-line (cdr new)) + (forward-line (cdr (if dry-run old new))) (setq pos (point))) ;; Display BUF in a window, and maybe select it -- 2.39.2