[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
default file for diff-backup
From: |
Alfred M. Szmidt |
Subject: |
default file for diff-backup |
Date: |
Fri, 20 Jun 2014 08:32:31 -0400 |
This makes diff-backup supply a default file name, making the
default behaviour a bit more useful.
*** lisp/vc/diff.el.~1~
--- lisp/vc/diff.el
***************
*** 187,194 ****
If this file is a backup, diff it with its original.
The backup file is the first file given to `diff'.
With prefix arg, prompt for diff switches."
! (interactive (list (read-file-name "Diff (file with backup): ")
! (diff-switches)))
(let (bak ori)
(if (backup-file-name-p file)
(setq bak file
--- 187,201 ----
If this file is a backup, diff it with its original.
The backup file is the first file given to `diff'.
With prefix arg, prompt for diff switches."
! (interactive
! (list
! (if (and buffer-file-name (file-exists-p buffer-file-name))
! (read-file-name
! (concat "Diff file with backup (default "
! (file-name-nondirectory buffer-file-name) "): ")
! nil buffer-file-name t)
! (read-file-name "Diff file with backup: " nil nil t))
! (diff-switches)))
(let (bak ori)
(if (backup-file-name-p file)
(setq bak file
Diff finished. Fri Jun 20 14:06:26 2014
- default file for diff-backup,
Alfred M. Szmidt <=
- Re: default file for diff-backup, Stefan Monnier, 2014/06/20
- RE: default file for diff-backup, Herring, Davis, 2014/06/20
- Re: default file for diff-backup, Alfred M. Szmidt, 2014/06/20
- RE: default file for diff-backup, Herring, Davis, 2014/06/20
- Re: default file for diff-backup, Alfred M. Szmidt, 2014/06/23
- RE: default file for diff-backup, Herring, Davis, 2014/06/23
- Re: default file for diff-backup, Alfred M. Szmidt, 2014/06/23
- RE: default file for diff-backup, Herring, Davis, 2014/06/24