From: Karl Heuer Date: Fri, 9 Jun 1995 01:17:59 +0000 (+0000) Subject: (vc-register): Check for a visited file first thing. X-Git-Tag: emacs-19.34~3707 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f1b82fc8cfdbe0c0f91ba753b8cf9d42cb83e2e0;p=emacs.git (vc-register): Check for a visited file first thing. --- diff --git a/lisp/vc.el b/lisp/vc.el index c68973505e8..4d5e29c86f6 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -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