emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v [EMACS_22_BASE]


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,v [EMACS_22_BASE]
Date: Tue, 08 Jan 2008 05:19:13 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Glenn Morris <gm>       08/01/08 05:19:13

Index: diff-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/diff-mode.el,v
retrieving revision 1.99.2.7
retrieving revision 1.99.2.8
diff -u -b -r1.99.2.7 -r1.99.2.8
--- diff-mode.el        7 Jan 2008 02:44:57 -0000       1.99.2.7
+++ diff-mode.el        8 Jan 2008 05:19:13 -0000       1.99.2.8
@@ -391,9 +391,13 @@
       ;; 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 "^[^<>#\\]")




reply via email to

[Prev in Thread] Current Thread [Next in Thread]