]> git.eshelyaron.com Git - emacs.git/commitdiff
(diff-add-change-log-entries-other-window): Avoid the
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 8 Feb 2008 16:00:55 +0000 (16:00 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 8 Feb 2008 16:00:55 +0000 (16:00 +0000)
splitter in context hunks.

lisp/ChangeLog
lisp/diff-mode.el

index f98813d6d3749bd4f4fcf52a0720af7d888b7566..3e1c40b930c1d5be2924c8fe3c0f83b390d3827a 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * diff-mode.el (diff-add-change-log-entries-other-window): Avoid the
+       splitter in context hunks.
+
 2008-02-08  Kenichi Handa  <handa@ni.aist.go.jp>
 
        * international/fontset.el (setup-default-fontset): Fix arabic otf
index bf6b5cf4895625f6531cdb136c0d474315e66abf..6e82b63581a2096f4a15c67a283a2e4c5e6a32ef 100644 (file)
@@ -1750,7 +1750,14 @@ I.e. like `add-change-log-entry-other-window' but applied to all hunks."
                    ;; 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