aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc.el')
-rw-r--r--lisp/vc.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 54f71fb0d9..c68973505e 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