From f1b82fc8cfdbe0c0f91ba753b8cf9d42cb83e2e0 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 9 Jun 1995 01:17:59 +0000 Subject: [PATCH] (vc-register): Check for a visited file first thing. --- lisp/vc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2