all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ams@gnu.org (Alfred M. Szmidt)
To: emacs-devel@gnu.org
Subject: default file for diff-backup
Date: Fri, 20 Jun 2014 08:32:31 -0400	[thread overview]
Message-ID: <E1Wxxzb-0002n2-Vp@fencepost.gnu.org> (raw)

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



             reply	other threads:[~2014-06-20 12:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 12:32 Alfred M. Szmidt [this message]
2014-06-20 19:10 ` default file for diff-backup 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Wxxzb-0002n2-Vp@fencepost.gnu.org \
    --to=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.