Mercurial > emacs
changeset 8195:a4f0f421752e
(diff-latest-backup-file): Cope with backups stored
in a different directory.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 11 Jul 1994 04:31:40 +0000 |
parents | b11f71df59d9 |
children | 89db3662bcec |
files | lisp/diff.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/diff.el Mon Jul 11 00:59:17 1994 +0000 +++ b/lisp/diff.el Mon Jul 11 04:31:40 1994 +0000 @@ -266,8 +266,12 @@ (or (let ((bak (make-backup-file-name fn))) (if (file-exists-p bak) bak)) - (let* ((dir (file-name-directory fn)) - (base-versions (concat (file-name-nondirectory fn) ".~")) + ;; 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)) + ".~")) (bv-length (length base-versions))) (concat dir (car (sort