(find-backup-file-name): delete nothing if overflow in number of files to keep.
This commit is contained in:
parent
7987a1696f
commit
9115e9389c
1 changed files with 4 additions and 1 deletions
|
@ -1141,7 +1141,10 @@ Value is a list whose car is the name for the backup file
|
|||
(if (not deserve-versions-p)
|
||||
(list (make-backup-file-name fn))
|
||||
(cons (concat fn ".~" (int-to-string (1+ high-water-mark)) "~")
|
||||
(if (> number-to-delete 0)
|
||||
(if (and (> number-to-delete 0)
|
||||
;; Delete nothing if there is overflow
|
||||
;; in the number of versions to keep.
|
||||
(>= (+ kept-new-versions kept-old-versions -1) 0))
|
||||
(mapcar (function (lambda (n)
|
||||
(concat fn ".~" (int-to-string n) "~")))
|
||||
(let ((v (nthcdr kept-old-versions versions)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue