From: Richard M. Stallman Date: Mon, 4 Aug 1997 04:29:53 +0000 (+0000) Subject: (vc-version-diff): Use defaults, not initial input, X-Git-Tag: emacs-20.1~820 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e710301e0063ed124cc5e589ab33729ae53fb84;p=emacs.git (vc-version-diff): Use defaults, not initial input, for reading the arguments. --- diff --git a/lisp/vc.el b/lisp/vc.el index bcee7f8ba0c..cde088d2176 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1302,8 +1302,7 @@ If FILE is a directory, generate diffs between versions for all registered files in or below it." (interactive (let ((file (read-file-name "File or directory to diff: " - default-directory buffer-file-name t - (file-name-nondirectory buffer-file-name))) + default-directory buffer-file-name t)) (rel1-default nil) (rel2-default nil)) ;; compute default versions based on the file state (cond @@ -1319,8 +1318,16 @@ files in or below it." (setq rel2-default (vc-workfile-version file)))) ;; construct argument list (list file - (read-string "Older version: " rel1-default) - (read-string "Newer version: " rel2-default)))) + (read-string (if rel1-default + (concat "Older version: (default " + rel1-default ") ") + "Older version: ") + nil nil rel1-default) + (read-string (if rel2-default + (concat "Newer version: (default " + rel2-default ") ") + "Newer version: ") + nil nil rel2-default)))) (if (string-equal rel1 "") (setq rel1 nil)) (if (string-equal rel2 "") (setq rel2 nil)) (if (file-directory-p file)