aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier2004-04-16 21:52:14 +0000
committerStefan Monnier2004-04-16 21:52:14 +0000
commit996884b257d62b98d3e4438848a510e19eaf021a (patch)
tree014d1c182419cbd964f2725452973644bd9f1136 /lisp/diff-mode.el
parenta1bfe073ea1774b5f14b77b37a08ebb7e1f23c90 (diff)
downloademacs-996884b257d62b98d3e4438848a510e19eaf021a.tar.gz
emacs-996884b257d62b98d3e4438848a510e19eaf021a.zip
(diff-end-of-hunk): Be more careful with unified hunks.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index f6b2520a112..d41bfcad58a 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -305,7 +305,11 @@ when editing big diffs)."
305(defvar diff-narrowed-to nil) 305(defvar diff-narrowed-to nil)
306 306
307(defun diff-end-of-hunk (&optional style) 307(defun diff-end-of-hunk (&optional style)
308 (if (looking-at diff-hunk-header-re) (goto-char (match-end 0))) 308 (when (looking-at diff-hunk-header-re)
309 (unless style
310 ;; Especially important for unified (because headers are ambiguous).
311 (setq style (cdr (assq (char-after) '((?@ . unified) (?* . context))))))
312 (goto-char (match-end 0)))
309 (let ((end (and (re-search-forward (case style 313 (let ((end (and (re-search-forward (case style
310 ;; A `unified' header is ambiguous. 314 ;; A `unified' header is ambiguous.
311 (unified (concat "^[^-+# \\]\\|" 315 (unified (concat "^[^-+# \\]\\|"