file under version control.
To get a prompt, use a prefix argument."
(interactive
(list
- buffer-file-name
+ (or buffer-file-name
+ (error "There is no version-controlled file in this buffer"))
(let ((backend (vc-backend buffer-file-name))
(backends nil))
+ (unless backend
+ (error "File %s is not under version control" buffer-file-name))
;; Find the registered backends.
(dolist (backend vc-handled-backends)
(when (vc-call-backend backend 'registered buffer-file-name)