diff options
author | Juri Linkov <juri@linkov.net> | 2017-02-28 00:53:46 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2017-02-28 00:53:46 +0200 |
commit | 499b43d4cc4aa8fd1131246aa544ab81e894e8da (patch) | |
tree | c9dc18c60603aab4044b0ce465508603044ee0b7 | |
parent | 61881d32ad4a8407fd4a3386a5f05b9f446f58fc (diff) | |
download | emacs-499b43d4cc4aa8fd1131246aa544ab81e894e8da.tar.gz |
* lisp/vc/add-log.el (change-log-next-buffer): Check if file exists
before adding it to the list of files.
-rw-r--r-- | lisp/vc/add-log.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 52be9c5a2be..ceef5724dce 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1077,14 +1077,16 @@ A sequence of buffers is formed by ChangeLog files with decreasing numeric file name suffixes in the directory of the initial ChangeLog file were isearch was started." (let* ((name (change-log-name)) - (files (cons name (sort (file-expand-wildcards - (concat name "[-.][0-9]*")) - (lambda (a b) - ;; The file's extension may not have a valid - ;; version form (e.g. VC backup revisions). - (ignore-errors - (version< (substring b (length name)) - (substring a (length name)))))))) + (files (append + (and (file-exists-p name) (list name)) + (sort (file-expand-wildcards + (concat name "[-.][0-9]*")) + (lambda (a b) + ;; The file's extension may not have a valid + ;; version form (e.g. VC backup revisions). + (ignore-errors + (version< (substring b (length name)) + (substring a (length name)))))))) (files (if isearch-forward files (reverse files))) (file (if wrap (car files) |