diff options
| author | Richard M. Stallman | 1997-08-04 04:29:53 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-04 04:29:53 +0000 |
| commit | 8e710301e0063ed124cc5e589ab33729ae53fb84 (patch) | |
| tree | e9282b1204bf09ea88c5c14c9433a7d10c4c1639 | |
| parent | f60a629a96cfbeb5a9a88750122f951821333566 (diff) | |
| download | emacs-8e710301e0063ed124cc5e589ab33729ae53fb84.tar.gz emacs-8e710301e0063ed124cc5e589ab33729ae53fb84.zip | |
(vc-version-diff): Use defaults, not initial input,
for reading the arguments.
| -rw-r--r-- | lisp/vc.el | 15 |
1 files changed, 11 insertions, 4 deletions
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 | |||
| 1302 | files in or below it." | 1302 | files in or below it." |
| 1303 | (interactive | 1303 | (interactive |
| 1304 | (let ((file (read-file-name "File or directory to diff: " | 1304 | (let ((file (read-file-name "File or directory to diff: " |
| 1305 | default-directory buffer-file-name t | 1305 | default-directory buffer-file-name t)) |
| 1306 | (file-name-nondirectory buffer-file-name))) | ||
| 1307 | (rel1-default nil) (rel2-default nil)) | 1306 | (rel1-default nil) (rel2-default nil)) |
| 1308 | ;; compute default versions based on the file state | 1307 | ;; compute default versions based on the file state |
| 1309 | (cond | 1308 | (cond |
| @@ -1319,8 +1318,16 @@ files in or below it." | |||
| 1319 | (setq rel2-default (vc-workfile-version file)))) | 1318 | (setq rel2-default (vc-workfile-version file)))) |
| 1320 | ;; construct argument list | 1319 | ;; construct argument list |
| 1321 | (list file | 1320 | (list file |
| 1322 | (read-string "Older version: " rel1-default) | 1321 | (read-string (if rel1-default |
| 1323 | (read-string "Newer version: " rel2-default)))) | 1322 | (concat "Older version: (default " |
| 1323 | rel1-default ") ") | ||
| 1324 | "Older version: ") | ||
| 1325 | nil nil rel1-default) | ||
| 1326 | (read-string (if rel2-default | ||
| 1327 | (concat "Newer version: (default " | ||
| 1328 | rel2-default ") ") | ||
| 1329 | "Newer version: ") | ||
| 1330 | nil nil rel2-default)))) | ||
| 1324 | (if (string-equal rel1 "") (setq rel1 nil)) | 1331 | (if (string-equal rel1 "") (setq rel1 nil)) |
| 1325 | (if (string-equal rel2 "") (setq rel2 nil)) | 1332 | (if (string-equal rel2 "") (setq rel2 nil)) |
| 1326 | (if (file-directory-p file) | 1333 | (if (file-directory-p file) |