summaryrefslogtreecommitdiff
path: root/lisp/vc-rcs.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-08-09 14:39:20 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-08-09 14:39:20 +0000
commit9d8f43bfbf6cda54e39a060c3626e52fed973e01 (patch)
tree259b2297135a7739fddc3108f6bff6a5ea5758f8 /lisp/vc-rcs.el
parent2b6cdf0a7f850ad04b55296cb2e56cd8cb02a122 (diff)
downloademacs-9d8f43bfbf6cda54e39a060c3626e52fed973e01.tar.gz
(vc-rcs-find-file-not-found-hook):
Move from vc-default-find-file-not-found-hook.
Diffstat (limited to 'lisp/vc-rcs.el')
-rw-r--r--lisp/vc-rcs.el8
1 files changed, 8 insertions, 0 deletions
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