# HG changeset patch # User Richard M. Stallman # Date 781062569 0 # Node ID 8aae61dee4df474c2d8bee947f2cac608c14ea7b # Parent fa3883c219ea25b5acf3f1b7509cfe91265e84c5 (vc-register): Verify an old master file really still exists before giving error. If it has disappeared, ask for confirmation. diff -r fa3883c219ea -r 8aae61dee4df lisp/vc.el --- a/lisp/vc.el Sat Oct 01 21:25:41 1994 +0000 +++ b/lisp/vc.el Sun Oct 02 01:49:29 1994 +0000 @@ -500,8 +500,12 @@ (defun vc-register (&optional override comment) "Register the current file into your version-control system." (interactive "P") - (if (vc-name buffer-file-name) - (error "This file is already registered")) + (let ((master (vc-name buffer-file-name))) + (and master (file-exists-p master) + (error "This file is already registered")) + (and master + (not (y-or-n-p "Previous master file has vanished. Make a new one? ")) + (error "This file is already registered"))) ;; Watch out for new buffers of size 0: the corresponding file ;; does not exist yet, even though buffer-modified-p is nil. (if (and (not (buffer-modified-p))