Mercurial > emacs
changeset 2431:03e538cb97b8
(find-backup-file-name): delete nothing if overflow in number of files to keep.
author | Noah Friedman <friedman@splode.com> |
---|---|
date | Tue, 30 Mar 1993 22:21:03 +0000 |
parents | 094bec4c13e9 |
children | 17a84e60603b |
files | lisp/files.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Tue Mar 30 21:31:15 1993 +0000 +++ b/lisp/files.el Tue Mar 30 22:21:03 1993 +0000 @@ -1141,7 +1141,10 @@ (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)))