summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-06-07 20:50:55 +0000
committerKarl Heuer <kwzh@gnu.org>1995-06-07 20:50:55 +0000
commit286dce1749bee22e14b54278d1ba5bc104e27af9 (patch)
treee1a29a6bb63d69efb0275f9a64323432a25b8251 /lisp
parent6d952f94d06cb8ec5961e794d84b310f7d2e42d9 (diff)
downloademacs-286dce1749bee22e14b54278d1ba5bc104e27af9.tar.gz
(vc-register): Clean error message if no visited file.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc.el2
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."
"Register the current file into your version-control system."
(interactive "P")
(let ((master (vc-name buffer-file-name)))
+ (or buffer-file-name
+ (error "No visited file"))
(and master (file-exists-p master)
(error "This file is already registered"))
(and master