1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-03 20:24:29 +00:00

(vc-rcs-find-file-not-found-hook):

Move from vc-default-find-file-not-found-hook.
This commit is contained in:
Stefan Monnier 2007-08-09 14:39:20 +00:00
parent 2b6cdf0a7f
commit 9d8f43bfbf

View File

@ -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