diff options
author | Markus Rost <rost@math.uni-bielefeld.de> | 2002-05-22 23:26:51 +0000 |
---|---|---|
committer | Markus Rost <rost@math.uni-bielefeld.de> | 2002-05-22 23:26:51 +0000 |
commit | 6b618df175ad073df13abf4c37f076d0ae2894b0 (patch) | |
tree | 8cf04b711ba4716f0a0819ba70b67d736652f710 /lisp/diff.el | |
parent | 8a5e82dbe3558ae8b346231cbbd7d712165e9f28 (diff) | |
download | emacs-6b618df175ad073df13abf4c37f076d0ae2894b0.tar.gz |
(diff-latest-backup-file): Replace the main code by a call of
file-newest-backup.
Diffstat (limited to 'lisp/diff.el')
-rw-r--r-- | lisp/diff.el | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lisp/diff.el b/lisp/diff.el index 19ec2e599ad..ee49482cfe8 100644 --- a/lisp/diff.el +++ b/lisp/diff.el @@ -295,30 +295,7 @@ The backup file is the first file given to `diff'." (let ((handler (find-file-name-handler fn 'diff-latest-backup-file))) (if handler (funcall handler 'diff-latest-backup-file fn) - ;; First try simple backup, then the highest numbered of the - ;; numbered backups. - ;; Ignore the value of version-control because we look for existing - ;; backups, which maybe were made earlier or by another user with - ;; a different value of version-control. - (setq fn (file-chase-links (expand-file-name fn))) - (or - (let ((bak (make-backup-file-name fn))) - (if (file-exists-p bak) bak)) - ;; We use BACKUPNAME to cope with backups stored in a different dir. - (let* ((backupname (car (find-backup-file-name fn))) - (dir (file-name-directory backupname)) - (base-versions (concat (file-name-sans-versions - (file-name-nondirectory backupname)) - ".~")) - ;; This is a fluid var for backup-extract-version. - (backup-extract-version-start (length base-versions))) - (concat dir - (car (sort - (file-name-all-completions base-versions dir) - (function - (lambda (fn1 fn2) - (> (backup-extract-version fn1) - (backup-extract-version fn2)))))))))))) + (file-newest-backup fn)))) (provide 'diff) |