aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 9e9eb81797a..6291453ba17 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -1,7 +1,7 @@
1;;; diff-mode.el --- a mode for viewing/editing context diffs 1;;; diff-mode.el --- a mode for viewing/editing context diffs
2 2
3;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 5
6;; Author: Stefan Monnier <monnier@iro.umontreal.ca> 6;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
7;; Keywords: convenience patch diff 7;; Keywords: convenience patch diff
@@ -401,9 +401,13 @@ when editing big diffs)."
401(defun diff-end-of-hunk (&optional style) 401(defun diff-end-of-hunk (&optional style)
402 ;; Especially important for unified (because headers are ambiguous). 402 ;; Especially important for unified (because headers are ambiguous).
403 (setq style (diff-hunk-style style)) 403 (setq style (diff-hunk-style style))
404 ;; Some versions of diff replace all-blank context lines in unified
405 ;; format with empty lines. The use of \n below avoids matching such
406 ;; lines as headers.
407 ;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html
404 (let ((end (and (re-search-forward (case style 408 (let ((end (and (re-search-forward (case style
405 ;; A `unified' header is ambiguous. 409 ;; A `unified' header is ambiguous.
406 (unified (concat "^[^-+# \\]\\|" 410 (unified (concat "^[^-+# \\\n]\\|"
407 diff-file-header-re)) 411 diff-file-header-re))
408 (context "^[^-+#! \\]") 412 (context "^[^-+#! \\]")
409 (normal "^[^<>#\\]") 413 (normal "^[^<>#\\]")