mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(diff-latest-backup-file): Cope with backups stored
in a different directory.
This commit is contained in:
parent
3ec5651bc0
commit
cf2d98df97
1 changed files with 6 additions and 2 deletions
|
|
@ -266,8 +266,12 @@ The backup file is the first file given to `diff'."
|
|||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue