From: Stefan Monnier Date: Thu, 9 Aug 2007 14:39:20 +0000 (+0000) Subject: (vc-rcs-find-file-not-found-hook): X-Git-Tag: emacs-pretest-22.1.90~1028 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9d8f43bfbf6cda54e39a060c3626e52fed973e01;p=emacs.git (vc-rcs-find-file-not-found-hook): Move from vc-default-find-file-not-found-hook. --- diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index d73f8522115..b341f82a73b 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -225,6 +225,14 @@ When VERSION is given, perform check for that version." ;; 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