From: Stefan Monnier Date: Fri, 29 Feb 2008 02:40:10 +0000 (+0000) Subject: (diff-sanity-check-hunk): Only accept an empty line if X-Git-Tag: emacs-pretest-22.1.92~41 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=79fd61680608307ec1be4c53705b542d8d383778;p=emacs.git (diff-sanity-check-hunk): Only accept an empty line if we still expect more lines. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 499f2fd82b3..438e2b5f52a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-02-29 Stefan Monnier + + * diff-mode.el (diff-sanity-check-hunk): Only accept an empty line if + we still expect more lines. + 2008-02-28 Juri Linkov * startup.el (normal-splash-screen): Add argument `concise'. diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 5a01793d06e..c57613dff51 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1251,7 +1251,8 @@ Only works for unified diffs." (cond ((and diff-valid-unified-empty-line ;; Not just (eolp) so we don't infloop at eob. - (eq (char-after) ?\n)) + (eq (char-after) ?\n) + (> before 0) (> after 0)) (decf before) (decf after) t) ((and (zerop before) (zerop after)) nil) ((or (< before 0) (< after 0))