diff options
author | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
---|---|---|
committer | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
commit | 4dd1f56f29fc598a8339a345c2f8945250600602 (patch) | |
tree | af341efedffe027e533b1bcc0dbf270532e48285 /lisp/vc/diff.el | |
parent | 4c49ec7f865bdad1629d2f125f71f4e506b258f2 (diff) | |
parent | 810fa21d26453f898de9747ece7205dfe6de9d08 (diff) | |
download | emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.gz emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.bz2 emacs-4dd1f56f29fc598a8339a345c2f8945250600602.zip |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lisp/vc/diff.el')
-rw-r--r-- | lisp/vc/diff.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 7bb1151602c..4061fedd578 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -87,24 +87,24 @@ minibuffer. The default for NEW is the current buffer's file name, and the default for OLD is a backup file for NEW, if one exists. If NO-ASYNC is non-nil, call diff synchronously. -When called interactively with a prefix argument, prompt +When called interactively with a prefix argument SWITCHES, prompt interactively for diff switches. Otherwise, the switches -specified in the variable `diff-switches' are passed to the -diff command. +specified in the variable `diff-switches' are passed to the diff +command. Non-interactively, OLD and NEW may each be a file or a buffer." (interactive (let* ((newf (if (and buffer-file-name (file-exists-p buffer-file-name)) (read-file-name - (concat "Diff new file (default " - (file-name-nondirectory buffer-file-name) "): ") + (format-prompt "Diff new file" + (file-name-nondirectory buffer-file-name)) nil buffer-file-name t) (read-file-name "Diff new file: " nil nil t))) (oldf (file-newest-backup newf))) (setq oldf (if (and oldf (file-exists-p oldf)) (read-file-name - (concat "Diff original file (default " - (file-name-nondirectory oldf) "): ") + (format-prompt "Diff original file" + (file-name-nondirectory oldf)) (file-name-directory oldf) oldf t) (read-file-name "Diff original file: " (file-name-directory newf) nil t))) @@ -229,7 +229,7 @@ returns the buffer used." Uses the latest backup, if there are several numerical backups. 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." +With prefix arg SWITCHES, prompt for diff switches." (interactive (list (read-file-name "Diff (file with backup): ") (diff-switches))) (let (bak ori) @@ -243,7 +243,7 @@ With prefix arg, prompt for diff switches." ;;;###autoload (defun diff-latest-backup-file (fn) - "Return the latest existing backup of FILE, or nil." + "Return the latest existing backup of file FN, or nil." (let ((handler (find-file-name-handler fn 'diff-latest-backup-file))) (if handler (funcall handler 'diff-latest-backup-file fn) |