Commit f7aabd88 authored by Karl Heuer's avatar Karl Heuer
Browse files

(vc-register): Clean error message if no visited file.

parent c6431f12
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment