aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/vc/add-log.el18
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
1077numeric file name suffixes in the directory of the initial ChangeLog 1077numeric file name suffixes in the directory of the initial ChangeLog
1078file were isearch was started." 1078file were isearch was started."
1079 (let* ((name (change-log-name)) 1079 (let* ((name (change-log-name))
1080 (files (cons name (sort (file-expand-wildcards 1080 (files (append
1081 (concat name "[-.][0-9]*")) 1081 (and (file-exists-p name) (list name))
1082 (lambda (a b) 1082 (sort (file-expand-wildcards
1083 ;; The file's extension may not have a valid 1083 (concat name "[-.][0-9]*"))
1084 ;; version form (e.g. VC backup revisions). 1084 (lambda (a b)
1085 (ignore-errors 1085 ;; The file's extension may not have a valid
1086 (version< (substring b (length name)) 1086 ;; version form (e.g. VC backup revisions).
1087 (substring a (length name)))))))) 1087 (ignore-errors
1088 (version< (substring b (length name))
1089 (substring a (length name))))))))
1088 (files (if isearch-forward files (reverse files))) 1090 (files (if isearch-forward files (reverse files)))
1089 (file (if wrap 1091 (file (if wrap
1090 (car files) 1092 (car files)