diff options
author | Jim Blandy <jimb@redhat.com> | 1992-07-10 01:16:40 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-07-10 01:16:40 +0000 |
commit | 79058860e129d648e6121ac1996dadf0128dc25a (patch) | |
tree | ec1d7adecd0ff6e5323941e0e2081779e433791d /lisp/files.el | |
parent | e3431643fb80ce9690aa6fa656996b753fd4c6ec (diff) | |
download | emacs-79058860e129d648e6121ac1996dadf0128dc25a.tar.gz |
*** empty log message ***
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/files.el b/lisp/files.el index aa597d642eb..c86008bb93b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -839,7 +839,14 @@ Value is a list whose car is the name for the backup file (possibilities (file-name-all-completions base-versions (file-name-directory fn))) - (versions (sort (mapcar 'backup-extract-version possibilities) + (versions (sort (mapcar + (function + (lambda (fn) + (if (and (string-match "[0-9]+~$" fn bv-length) + (= (match-beginning 0) bv-length)) + (string-to-int (substring fn bv-length -1)) + 0))) + possibilities) '<)) (high-water-mark (apply 'max 0 versions)) (deserve-versions-p @@ -857,12 +864,6 @@ Value is a list whose car is the name for the backup file (rplacd (nthcdr (1- number-to-delete) v) ()) v)))))))) -(defun backup-extract-version (fn) - (if (and (string-match "[0-9]+~$" fn bv-length) - (= (match-beginning 0) bv-length)) - (string-to-int (substring fn bv-length -1)) - 0)) - (defun file-nlinks (filename) "Return number of names file FILENAME has." (car (cdr (file-attributes filename)))) |