diff options
| author | Karl Heuer | 1995-06-07 20:50:55 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-06-07 20:50:55 +0000 |
| commit | f7aabd88d83b859f9236f4b3e324c87166740926 (patch) | |
| tree | 2c99421b8ec4f728633ff11a985edc174fd83da9 | |
| parent | c6431f12aaad67960924c20758e8810076c0e4d0 (diff) | |
| download | emacs-f7aabd88d83b859f9236f4b3e324c87166740926.tar.gz emacs-f7aabd88d83b859f9236f4b3e324c87166740926.zip | |
(vc-register): Clean error message if no visited file.
| -rw-r--r-- | lisp/vc.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 54f71fb0d93..c68973505e8 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -640,6 +640,8 @@ merge in the changes into your working copy." | |||
| 640 | "Register the current file into your version-control system." | 640 | "Register the current file into your version-control system." |
| 641 | (interactive "P") | 641 | (interactive "P") |
| 642 | (let ((master (vc-name buffer-file-name))) | 642 | (let ((master (vc-name buffer-file-name))) |
| 643 | (or buffer-file-name | ||
| 644 | (error "No visited file")) | ||
| 643 | (and master (file-exists-p master) | 645 | (and master (file-exists-p master) |
| 644 | (error "This file is already registered")) | 646 | (error "This file is already registered")) |
| 645 | (and master | 647 | (and master |