From 9d8f43bfbf6cda54e39a060c3626e52fed973e01 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 9 Aug 2007 14:39:20 +0000 Subject: [PATCH] (vc-rcs-find-file-not-found-hook): Move from vc-default-find-file-not-found-hook. --- lisp/vc-rcs.el | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.39.2