# HG changeset patch # User Dan Nicolaescu # Date 1246060435 0 # Node ID 0c5de07aff62fa3af3ad973c130a4b694db42472 # Parent de3fb78ac3dfdb4a59ac7a04239785ee6990f2fb 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. diff -r de3fb78ac3df -r 0c5de07aff62 etc/NEWS --- a/etc/NEWS Fri Jun 26 23:41:43 2009 +0000 +++ b/etc/NEWS Fri Jun 26 23:53:55 2009 +0000 @@ -32,6 +32,10 @@ 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. + * Installation Changes in Emacs 23.1 diff -r de3fb78ac3df -r 0c5de07aff62 lisp/ChangeLog --- a/lisp/ChangeLog Fri Jun 26 23:41:43 2009 +0000 +++ b/lisp/ChangeLog Fri Jun 26 23:53:55 2009 +0000 @@ -1,3 +1,14 @@ +2009-06-26 Dan Nicolaescu + + 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 * textmodes/ispell.el: Add `ispell-looking-back' XEmacs diff -r de3fb78ac3df -r 0c5de07aff62 lisp/vc-git.el --- a/lisp/vc-git.el Fri Jun 26 23:41:43 2009 +0000 +++ b/lisp/vc-git.el Fri Jun 26 23:53:55 2009 +0000 @@ -101,7 +101,6 @@ ;; - 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) diff -r de3fb78ac3df -r 0c5de07aff62 lisp/vc-hg.el --- a/lisp/vc-hg.el Fri Jun 26 23:41:43 2009 +0000 +++ b/lisp/vc-hg.el Fri Jun 26 23:53:55 2009 +0000 @@ -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 diff -r de3fb78ac3df -r 0c5de07aff62 lisp/vc-hooks.el --- a/lisp/vc-hooks.el Fri Jun 26 23:41:43 2009 +0000 +++ b/lisp/vc-hooks.el Fri Jun 26 23:53:55 2009 +0000 @@ -911,27 +911,6 @@ (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))) diff -r de3fb78ac3df -r 0c5de07aff62 lisp/vc-rcs.el --- a/lisp/vc-rcs.el Fri Jun 26 23:41:43 2009 +0000 +++ b/lisp/vc-rcs.el Fri Jun 26 23:53:55 2009 +0000 @@ -247,14 +247,6 @@ ;; 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 diff -r de3fb78ac3df -r 0c5de07aff62 lisp/vc.el --- a/lisp/vc.el Fri Jun 26 23:41:43 2009 +0000 +++ b/lisp/vc.el Fri Jun 26 23:53:55 2009 +0000 @@ -513,11 +513,6 @@ ;; 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