changeset 78519:b2a41f8ce78a

(vc-rcs-find-file-not-found-hook): Move from vc-default-find-file-not-found-hook.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 09 Aug 2007 14:39:20 +0000
parents 62392db87d61
children 318e4215e076
files lisp/vc-rcs.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-rcs.el	Thu Aug 09 08:09:03 2007 +0000
+++ b/lisp/vc-rcs.el	Thu Aug 09 14:39:20 2007 +0000
@@ -225,6 +225,14 @@
     ;; The workfile is unchanged if rcsdiff found no differences.
     (zerop status)))
 
+(defun vc-rcs-find-file-not-found-hook ()
+  (if (yes-or-no-p
+       (format "File %s was lost; check out from version control? "
+	       (file-name-nondirectory buffer-file-name)))
+      (save-excursion
+	(require 'vc)
+	(let ((default-directory (file-name-directory buffer-file-name)))
+          (not (vc-error-occurred (vc-checkout buffer-file-name)))))))
 
 ;;;
 ;;; State-changing functions