From: Stefan Monnier Date: Wed, 9 Sep 2009 14:47:54 +0000 (+0000) Subject: (diff-hunk-kill): Fix the search of the next hunk (bug#4368). X-Git-Tag: emacs-pretest-23.1.90~1438 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cd8752523c8e4e2fe3655c2e81edd133fb8c1947;p=emacs.git (diff-hunk-kill): Fix the search of the next hunk (bug#4368). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a173f58335a..d030d24304e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-09-09 Stefan Monnier + + * diff-mode.el (diff-hunk-kill): Fix the search of the next hunk + (bug#4368). + 2009-09-09 Katsumi Yamaoka * calendar/time-date.el (autoload): diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 56bcde521ac..93a8a418806 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -546,7 +546,8 @@ If the prefix ARG is given, restrict the view to the current file instead." (interactive) (diff-beginning-of-hunk) (let* ((start (point)) - (nexthunk (when (re-search-forward diff-hunk-header-re nil t) + ;; Search the second match, since we're looking at the first. + (nexthunk (when (re-search-forward diff-hunk-header-re nil t 2) (match-beginning 0))) (firsthunk (ignore-errors (goto-char start)