emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 499b43d: * lisp/vc/add-log.el (change-log-next-buff


From: Juri Linkov
Subject: [Emacs-diffs] master 499b43d: * lisp/vc/add-log.el (change-log-next-buffer): Check if file exists
Date: Mon, 27 Feb 2017 17:53:55 -0500 (EST)

branch: master
commit 499b43d4cc4aa8fd1131246aa544ab81e894e8da
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/vc/add-log.el (change-log-next-buffer): Check if file exists
    
    before adding it to the list of files.
---
 lisp/vc/add-log.el | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index 52be9c5..ceef572 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)



reply via email to

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