diff options
| author | Noah Friedman | 1993-03-30 22:21:03 +0000 |
|---|---|---|
| committer | Noah Friedman | 1993-03-30 22:21:03 +0000 |
| commit | 9115e9389c75ae7f0da5743421aebb3977016e6d (patch) | |
| tree | ef746692b85d4b35df25a2df30780ae0c7bf4d4f | |
| parent | 7987a1696f3a80859f0396e54145dc525e5ea4bf (diff) | |
| download | emacs-9115e9389c75ae7f0da5743421aebb3977016e6d.tar.gz emacs-9115e9389c75ae7f0da5743421aebb3977016e6d.zip | |
(find-backup-file-name): delete nothing if overflow in number of files to keep.
| -rw-r--r-- | lisp/files.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index b8cb0a0ea5c..fe3a29cfdd1 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1141,7 +1141,10 @@ Value is a list whose car is the name for the backup file | |||
| 1141 | (if (not deserve-versions-p) | 1141 | (if (not deserve-versions-p) |
| 1142 | (list (make-backup-file-name fn)) | 1142 | (list (make-backup-file-name fn)) |
| 1143 | (cons (concat fn ".~" (int-to-string (1+ high-water-mark)) "~") | 1143 | (cons (concat fn ".~" (int-to-string (1+ high-water-mark)) "~") |
| 1144 | (if (> number-to-delete 0) | 1144 | (if (and (> number-to-delete 0) |
| 1145 | ;; Delete nothing if there is overflow | ||
| 1146 | ;; in the number of versions to keep. | ||
| 1147 | (>= (+ kept-new-versions kept-old-versions -1) 0)) | ||
| 1145 | (mapcar (function (lambda (n) | 1148 | (mapcar (function (lambda (n) |
| 1146 | (concat fn ".~" (int-to-string n) "~"))) | 1149 | (concat fn ".~" (int-to-string n) "~"))) |
| 1147 | (let ((v (nthcdr kept-old-versions versions))) | 1150 | (let ((v (nthcdr kept-old-versions versions))) |