emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117952: * lisp/vc/add-log.el (change-log-next-buffe


From: Juri Linkov
Subject: [Emacs-diffs] trunk r117952: * lisp/vc/add-log.el (change-log-next-buffer): Don't create an empty
Date: Thu, 25 Sep 2014 20:56:05 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117952
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18547
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Thu 2014-09-25 23:55:58 +0300
message:
  * lisp/vc/add-log.el (change-log-next-buffer): Don't create an empty
  buffer "ChangeLog" when the current buffer doesn't match ChangeLog.[0-9].
  Return the current buffer if no files match the default pattern
  ChangeLog.[0-9].  Signal "end of multi" when file is nil.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/vc/add-log.el             addlog.el-20091113204419-o5vbwnq5f7feedwu-481
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-09-25 13:07:28 +0000
+++ b/lisp/ChangeLog    2014-09-25 20:55:58 +0000
@@ -1,3 +1,10 @@
+2014-09-25  Juri Linkov  <address@hidden>
+
+       * vc/add-log.el (change-log-next-buffer): Don't create an empty
+       buffer "ChangeLog" when the current buffer doesn't match 
ChangeLog.[0-9].
+       Return the current buffer if no files match the default pattern
+       ChangeLog.[0-9].  Signal "end of multi" when file is nil. (Bug#18547)
+
 2014-09-25  Stefan Monnier  <address@hidden>
 
        * net/tramp-sh.el (tramp-sh-handle-vc-registered): Don't modify

=== modified file 'lisp/vc/add-log.el'
--- a/lisp/vc/add-log.el        2014-02-10 01:34:22 +0000
+++ b/lisp/vc/add-log.el        2014-09-25 20:55:58 +0000
@@ -1097,12 +1097,17 @@
                                    (ignore-errors
                                      (version< (substring b (length name))
                                                (substring a (length 
name))))))))
-        (files (if isearch-forward files (reverse files))))
-    (find-file-noselect
-     (if wrap
-        (car files)
-       (cadr (member (file-name-nondirectory (buffer-file-name buffer))
-                    files))))))
+        (files (if isearch-forward files (reverse files)))
+        (file (if wrap
+                  (car files)
+                (cadr (member (file-name-nondirectory (buffer-file-name 
buffer))
+                              files)))))
+    ;; If there are no files that match the default pattern ChangeLog.[0-9],
+    ;; return the current buffer to force isearch wrapping to its beginning.
+    ;; If file is nil, multi-isearch-search-fun will signal "end of multi".
+    (if (file-exists-p file)
+       (find-file-noselect file)
+      (current-buffer))))
 
 (defun change-log-fill-forward-paragraph (n)
   "Cut paragraphs so filling preserves open parentheses at beginning of lines."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]