diff options
author | Juri Linkov <juri@jurta.org> | 2014-09-25 23:55:58 +0300 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2014-09-25 23:55:58 +0300 |
commit | b8e352d077f14c52d7e6baa1800def8d3ec61f06 (patch) | |
tree | b5711d088917328f9c8d4033a7feb3a607f5fbe0 /lisp/vc/add-log.el | |
parent | 686b21966f812707e1d1c614ddd63d1d24fbdf18 (diff) | |
download | emacs-b8e352d077f14c52d7e6baa1800def8d3ec61f06.tar.gz |
* 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.
Fixes: debbugs:18547
Diffstat (limited to 'lisp/vc/add-log.el')
-rw-r--r-- | lisp/vc/add-log.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 8e44c024dc4..cd6fcaec28e 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1097,12 +1097,17 @@ file were isearch was started." (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." |