diff options
author | Glenn Morris <rgm@gnu.org> | 2008-01-08 05:19:13 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-01-08 05:19:13 +0000 |
commit | 1c6aa2f55f3b54ec27799c9e36a7b737ec81112a (patch) | |
tree | fa9a42eae48bdfa5c27b8d3ff8a72e3feff2bd71 /lisp/diff-mode.el | |
parent | d1050c6987122d508c57d717cc13f902f313ec45 (diff) | |
download | emacs-1c6aa2f55f3b54ec27799c9e36a7b737ec81112a.tar.gz emacs-1c6aa2f55f3b54ec27799c9e36a7b737ec81112a.tar.bz2 emacs-1c6aa2f55f3b54ec27799c9e36a7b737ec81112a.zip |
(diff-end-of-hunk): Don't match empty lines in unified format.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 4c566b344a9..a088cd6ccba 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -391,9 +391,13 @@ when editing big diffs)." ;; Especially important for unified (because headers are ambiguous). (setq style (cdr (assq (char-after) '((?@ . unified) (?* . context)))))) (goto-char (match-end 0))) + ;; Some versions of diff replace all-blank context lines in unified + ;; format with empty lines. The use of \n below avoids matching such + ;; lines as headers. + ;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html (let ((end (and (re-search-forward (case style ;; A `unified' header is ambiguous. - (unified (concat "^[^-+# \\]\\|" + (unified (concat "^[^-+# \\\n]\\|" diff-file-header-re)) (context "^[^-+#! \\]") (normal "^[^<>#\\]") |