Mercurial > emacs
changeset 9216:8aae61dee4df
(vc-register): Verify an old master file really still exists
before giving error. If it has disappeared, ask for confirmation.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 02 Oct 1994 01:49:29 +0000 |
parents | fa3883c219ea |
children | 1ed75812c134 |
files | lisp/vc.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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))