(vc-register): Check for a visited file first thing.
This commit is contained in:
parent
41015a196c
commit
f1b82fc8cf
1 changed files with 2 additions and 2 deletions
|
@ -639,9 +639,9 @@ merge in the changes into your working copy."
|
|||
(defun vc-register (&optional override comment)
|
||||
"Register the current file into your version-control system."
|
||||
(interactive "P")
|
||||
(or buffer-file-name
|
||||
(error "No visited file"))
|
||||
(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
|
||||
|
|
Loading…
Add table
Reference in a new issue