From 79058860e129d648e6121ac1996dadf0128dc25a Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 10 Jul 1992 01:16:40 +0000 Subject: *** empty log message *** --- lisp/files.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lisp/files.el') 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)))) -- cgit v1.2.1