comparison lisp/diff-mode.el @ 87761:74f3c7c77fbe

(diff-end-of-hunk): Revert 2008-01-08 change.
author Glenn Morris <rgm@gnu.org>
date Tue, 15 Jan 2008 03:54:51 +0000
parents 706ecd592fce
children c70e45a7acfd 15d5c70e7c61
comparison
equal deleted inserted replaced
87760:163e8bf7a33a 87761:74f3c7c77fbe
399 style) 399 style)
400 400
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
408 (let ((end (and (re-search-forward (case style 404 (let ((end (and (re-search-forward (case style
409 ;; A `unified' header is ambiguous. 405 ;; A `unified' header is ambiguous.
410 (unified (concat "^[^-+# \\\n]\\|" 406 (unified (concat "^[^-+# \\]\\|"
411 diff-file-header-re)) 407 diff-file-header-re))
412 (context "^[^-+#! \\]") 408 (context "^[^-+#! \\]")
413 (normal "^[^<>#\\]") 409 (normal "^[^<>#\\]")
414 (t "^[^-+#!<> \\]")) 410 (t "^[^-+#!<> \\]"))
415 nil t) 411 nil t)