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


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

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/01/08 05:17:14

Index: diff-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/diff-mode.el,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- diff-mode.el        21 Oct 2007 07:33:32 -0000      1.122
+++ diff-mode.el        8 Jan 2008 05:17:14 -0000       1.123
@@ -1,7 +1,7 @@
 ;;; diff-mode.el --- a mode for viewing/editing context diffs
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <address@hidden>
 ;; Keywords: convenience patch diff
@@ -401,9 +401,13 @@
 (defun diff-end-of-hunk (&optional style)
   ;; Especially important for unified (because headers are ambiguous).
   (setq style (diff-hunk-style style))
+  ;; 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]