Mercurial > emacs
diff lisp/diff-mode.el @ 91666:2229d6434820
(diff-add-change-log-entries-other-window): Avoid the
splitter in context hunks.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Fri, 08 Feb 2008 16:00:55 +0000 |
| parents | bc2ac468b977 |
| children | 4302897b076a |
line wrap: on
line diff
--- a/lisp/diff-mode.el Fri Feb 08 15:39:03 2008 +0000 +++ b/lisp/diff-mode.el Fri Feb 08 16:00:55 2008 +0000 @@ -1750,7 +1750,14 @@ ;; Move to where the changes are, ;; `add-change-log-entry-other-window' works better in ;; that case. - (re-search-forward "\n[!+-<>]" nil t)) + (re-search-forward + (concat "\n[!+-<>]" + ;; If the hunk is a context hunk with an empty first + ;; half, recognize the "--- NNN,MMM ----" line + "\\(-- [0-9]+\\(,[0-9]+\\)? ----\n" + ;; and skip to the next non-context line. + "\\( .*\n\\)*[+]\\)?") + nil t)) (save-excursion (add-change-log-entry-other-window) ;; Insert a "." so that the entries created don't get
