# HG changeset patch # User Markus Rost # Date 1022110011 0 # Node ID 6b7dcaa53b5c7c6f793baa846315f8934ea72b94 # Parent 7d93671b3743091107eb5d1e76f22b23547bd46a (diff-latest-backup-file): Replace the main code by a call of file-newest-backup. diff -r 7d93671b3743 -r 6b7dcaa53b5c lisp/diff.el --- a/lisp/diff.el Wed May 22 21:18:25 2002 +0000 +++ b/lisp/diff.el Wed May 22 23:26:51 2002 +0000 @@ -295,30 +295,7 @@ (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)