]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove find-file-not-found-hook VC method. (Bug#2757)
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 26 Jun 2009 23:53:55 +0000 (23:53 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 26 Jun 2009 23:53:55 +0000 (23:53 +0000)
* vc-hooks.el (vc-file-not-found-hook)
(vc-default-find-file-not-found-hook): Remove functions.
(find-file-not-found-functions): Do not add vc-file-not-found-hook.
* vc-rcs.el (vc-rcs-find-file-not-found-hook): Remove function.
* vc.el:
* vc-hg.el:
* vc-git.el: Do not mention find-file-not-found-hook VC method.

etc/NEWS
lisp/ChangeLog
lisp/vc-git.el
lisp/vc-hg.el
lisp/vc-hooks.el
lisp/vc-rcs.el
lisp/vc.el

index 23a73b816698b98e0cb3763eaa00adb7755f462d..d4819fc040e93066cc204de167b42711c2da6e99 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -32,6 +32,10 @@ so we will look at it and add it to the manual.
 On systems which support GVFS-Fuse, Tramp offers the new connection
 methods "dav", "davs" and "obex".
 
+** VC and related modes
+
+*** When a file is not found, VC will not try to check it out of RCS anymore.
+
 \f
 * Installation Changes in Emacs 23.1
 
index a565001508605045b7f8b6a1fac1a360b5e113b2..5b9871323aa32f7162cc08ada596ac8818b9dc29 100644 (file)
@@ -1,3 +1,14 @@
+2009-06-26  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       Remove find-file-not-found-hook VC method.  (Bug#2757)
+       * vc-hooks.el (vc-file-not-found-hook)
+       (vc-default-find-file-not-found-hook): Remove functions.
+       (find-file-not-found-functions): Do not add vc-file-not-found-hook.
+       * vc-rcs.el (vc-rcs-find-file-not-found-hook): Remove function.
+       * vc.el:
+       * vc-hg.el:
+       * vc-git.el: Do not mention find-file-not-found-hook VC method.
+
 2009-06-25  Agustín Martín  <agustin.martin@hispalinux.es>
 
        * textmodes/ispell.el: Add `ispell-looking-back' XEmacs
index 9155fba053fb6e56b21db59e60f9ed6a456350d0..12441c8dc860e5cd00c55d95cffd506b5bd6c1f7 100644 (file)
 ;; - delete-file (file)                           OK
 ;; - rename-file (old new)                OK
 ;; - find-file-hook ()                    NOT NEEDED
-;; - find-file-not-found-hook ()                NOT NEEDED
 
 (eval-when-compile
   (require 'cl)
index 26bf25cfc61fa838db3dea9e0d7a23df01f9a290..a8a8895de01bf7cfc8347bc85fe35891853dbba1 100644 (file)
@@ -92,7 +92,6 @@
 ;; - delete-file (file)                        TEST IT
 ;; - rename-file (old new)                     OK
 ;; - find-file-hook ()                         PROBABLY NOT NEEDED
-;; - find-file-not-found-hook ()               PROBABLY NOT NEEDED
 
 ;; 2) Implement Stefan Monnier's advice:
 ;; vc-hg-registered and vc-hg-state
index 83d89027f8f65d1b134d45e4f4a1afcf7eb146c9..d35471a4738e1df54c7d9b655417b7a534edd1bf 100644 (file)
@@ -911,27 +911,6 @@ current, and kill the buffer that visits the link."
 
 (add-hook 'find-file-hook 'vc-find-file-hook)
 
-;; more hooks, this time for file-not-found
-(defun vc-file-not-found-hook ()
-  "When file is not found, try to check it out from version control.
-Returns t if checkout was successful, nil otherwise.
-Used in `find-file-not-found-functions'."
-  ;; When a file does not exist, ignore cached info about it
-  ;; from a previous visit.
-  ;; We check that `buffer-file-name' is non-nil.  It should be always
-  ;; the case, but in conjunction with Tramp, it might be nil.  M. Albinus.
-  (when buffer-file-name
-    (vc-file-clearprops buffer-file-name)
-    (let ((backend (vc-backend buffer-file-name)))
-      (when backend (vc-call-backend backend 'find-file-not-found-hook)))))
-
-(defun vc-default-find-file-not-found-hook (backend)
-  ;; This used to do what vc-rcs-find-file-not-found-hook does, but it only
-  ;; really makes sense for RCS.  For other backends, better not do anything.
-  nil)
-
-(add-hook 'find-file-not-found-functions 'vc-file-not-found-hook)
-
 (defun vc-kill-buffer-hook ()
   "Discard VC info about a file when we kill its buffer."
   (when buffer-file-name (vc-file-clearprops buffer-file-name)))
index 0a5ebe42eecd2e6cd97cfd220451f3c72d5beb8a..ec30ca4576ccc26dc9e567db8e81e66c887f6c31 100644 (file)
@@ -247,14 +247,6 @@ 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)))))))
 \f
 ;;;
 ;;; State-changing functions
index a14e95f7b42c4b84df1538f138ef42417024c36b..d063c2c8abc6234bfc65150fd9d9f5a852cd9123 100644 (file)
 ;;   Operation called in current buffer when opening a file.  This can
 ;;   be used by the backend to setup some local variables it might need.
 ;;
-;; - find-file-not-found-hook ()
-;;
-;;   Operation called in current buffer when opening a non-existing file.
-;;   By default, this asks the user if she wants to check out the file.
-;;
 ;; - extra-menu ()
 ;;
 ;;   Return a menu keymap, the items in the keymap will appear at the