unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* default file for diff-backup
@ 2014-06-20 12:32 Alfred M. Szmidt
  2014-06-20 19:10 ` Stefan Monnier
  2014-06-20 19:56 ` Herring, Davis
  0 siblings, 2 replies; 10+ messages in thread
From: Alfred M. Szmidt @ 2014-06-20 12:32 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-06-24  4:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 12:32 default file for diff-backup Alfred M. Szmidt
2014-06-20 19:10 ` Stefan Monnier
2014-06-20 20:26   ` Alfred M. Szmidt
2014-06-20 19:56 ` Herring, Davis
2014-06-20 20:26   ` Alfred M. Szmidt
2014-06-20 20:29     ` Herring, Davis
2014-06-23  9:19       ` Alfred M. Szmidt
2014-06-23 15:42         ` Herring, Davis
2014-06-23 21:20           ` Alfred M. Szmidt
2014-06-24  4:42             ` Herring, Davis

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).