diff options
| author | Dan Nicolaescu | 2009-06-26 23:53:55 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-06-26 23:53:55 +0000 |
| commit | 3c3bf6ce8fb1f31177db297dc70bfae25cca552a (patch) | |
| tree | b78c6c8d9914e01175254a9e9cb4be1c1fbeeddf | |
| parent | 297710942213ef3bf4a06190459bbc1fb0362ffb (diff) | |
| download | emacs-3c3bf6ce8fb1f31177db297dc70bfae25cca552a.tar.gz emacs-3c3bf6ce8fb1f31177db297dc70bfae25cca552a.zip | |
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.
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/vc-git.el | 1 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 1 | ||||
| -rw-r--r-- | lisp/vc-hooks.el | 21 | ||||
| -rw-r--r-- | lisp/vc-rcs.el | 8 | ||||
| -rw-r--r-- | lisp/vc.el | 5 |
7 files changed, 15 insertions, 36 deletions
| @@ -32,6 +32,10 @@ so we will look at it and add it to the manual. | |||
| 32 | On systems which support GVFS-Fuse, Tramp offers the new connection | 32 | On systems which support GVFS-Fuse, Tramp offers the new connection |
| 33 | methods "dav", "davs" and "obex". | 33 | methods "dav", "davs" and "obex". |
| 34 | 34 | ||
| 35 | ** VC and related modes | ||
| 36 | |||
| 37 | *** When a file is not found, VC will not try to check it out of RCS anymore. | ||
| 38 | |||
| 35 | 39 | ||
| 36 | * Installation Changes in Emacs 23.1 | 40 | * Installation Changes in Emacs 23.1 |
| 37 | 41 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5650015086..5b9871323aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2009-06-26 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | Remove find-file-not-found-hook VC method. (Bug#2757) | ||
| 4 | * vc-hooks.el (vc-file-not-found-hook) | ||
| 5 | (vc-default-find-file-not-found-hook): Remove functions. | ||
| 6 | (find-file-not-found-functions): Do not add vc-file-not-found-hook. | ||
| 7 | * vc-rcs.el (vc-rcs-find-file-not-found-hook): Remove function. | ||
| 8 | * vc.el: | ||
| 9 | * vc-hg.el: | ||
| 10 | * vc-git.el: Do not mention find-file-not-found-hook VC method. | ||
| 11 | |||
| 1 | 2009-06-25 Agustín Martín <agustin.martin@hispalinux.es> | 12 | 2009-06-25 Agustín Martín <agustin.martin@hispalinux.es> |
| 2 | 13 | ||
| 3 | * textmodes/ispell.el: Add `ispell-looking-back' XEmacs | 14 | * textmodes/ispell.el: Add `ispell-looking-back' XEmacs |
diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 9155fba053f..12441c8dc86 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el | |||
| @@ -101,7 +101,6 @@ | |||
| 101 | ;; - delete-file (file) OK | 101 | ;; - delete-file (file) OK |
| 102 | ;; - rename-file (old new) OK | 102 | ;; - rename-file (old new) OK |
| 103 | ;; - find-file-hook () NOT NEEDED | 103 | ;; - find-file-hook () NOT NEEDED |
| 104 | ;; - find-file-not-found-hook () NOT NEEDED | ||
| 105 | 104 | ||
| 106 | (eval-when-compile | 105 | (eval-when-compile |
| 107 | (require 'cl) | 106 | (require 'cl) |
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 26bf25cfc61..a8a8895de01 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el | |||
| @@ -92,7 +92,6 @@ | |||
| 92 | ;; - delete-file (file) TEST IT | 92 | ;; - delete-file (file) TEST IT |
| 93 | ;; - rename-file (old new) OK | 93 | ;; - rename-file (old new) OK |
| 94 | ;; - find-file-hook () PROBABLY NOT NEEDED | 94 | ;; - find-file-hook () PROBABLY NOT NEEDED |
| 95 | ;; - find-file-not-found-hook () PROBABLY NOT NEEDED | ||
| 96 | 95 | ||
| 97 | ;; 2) Implement Stefan Monnier's advice: | 96 | ;; 2) Implement Stefan Monnier's advice: |
| 98 | ;; vc-hg-registered and vc-hg-state | 97 | ;; vc-hg-registered and vc-hg-state |
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 83d89027f8f..d35471a4738 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -911,27 +911,6 @@ current, and kill the buffer that visits the link." | |||
| 911 | 911 | ||
| 912 | (add-hook 'find-file-hook 'vc-find-file-hook) | 912 | (add-hook 'find-file-hook 'vc-find-file-hook) |
| 913 | 913 | ||
| 914 | ;; more hooks, this time for file-not-found | ||
| 915 | (defun vc-file-not-found-hook () | ||
| 916 | "When file is not found, try to check it out from version control. | ||
| 917 | Returns t if checkout was successful, nil otherwise. | ||
| 918 | Used in `find-file-not-found-functions'." | ||
| 919 | ;; When a file does not exist, ignore cached info about it | ||
| 920 | ;; from a previous visit. | ||
| 921 | ;; We check that `buffer-file-name' is non-nil. It should be always | ||
| 922 | ;; the case, but in conjunction with Tramp, it might be nil. M. Albinus. | ||
| 923 | (when buffer-file-name | ||
| 924 | (vc-file-clearprops buffer-file-name) | ||
| 925 | (let ((backend (vc-backend buffer-file-name))) | ||
| 926 | (when backend (vc-call-backend backend 'find-file-not-found-hook))))) | ||
| 927 | |||
| 928 | (defun vc-default-find-file-not-found-hook (backend) | ||
| 929 | ;; This used to do what vc-rcs-find-file-not-found-hook does, but it only | ||
| 930 | ;; really makes sense for RCS. For other backends, better not do anything. | ||
| 931 | nil) | ||
| 932 | |||
| 933 | (add-hook 'find-file-not-found-functions 'vc-file-not-found-hook) | ||
| 934 | |||
| 935 | (defun vc-kill-buffer-hook () | 914 | (defun vc-kill-buffer-hook () |
| 936 | "Discard VC info about a file when we kill its buffer." | 915 | "Discard VC info about a file when we kill its buffer." |
| 937 | (when buffer-file-name (vc-file-clearprops buffer-file-name))) | 916 | (when buffer-file-name (vc-file-clearprops buffer-file-name))) |
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index 0a5ebe42eec..ec30ca4576c 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el | |||
| @@ -247,14 +247,6 @@ When VERSION is given, perform check for that version." | |||
| 247 | ;; The workfile is unchanged if rcsdiff found no differences. | 247 | ;; The workfile is unchanged if rcsdiff found no differences. |
| 248 | (zerop status))) | 248 | (zerop status))) |
| 249 | 249 | ||
| 250 | (defun vc-rcs-find-file-not-found-hook () | ||
| 251 | (if (yes-or-no-p | ||
| 252 | (format "File %s was lost; check out from version control? " | ||
| 253 | (file-name-nondirectory buffer-file-name))) | ||
| 254 | (save-excursion | ||
| 255 | (require 'vc) | ||
| 256 | (let ((default-directory (file-name-directory buffer-file-name))) | ||
| 257 | (not (vc-error-occurred (vc-checkout buffer-file-name))))))) | ||
| 258 | 250 | ||
| 259 | ;;; | 251 | ;;; |
| 260 | ;;; State-changing functions | 252 | ;;; State-changing functions |
diff --git a/lisp/vc.el b/lisp/vc.el index a14e95f7b42..d063c2c8abc 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -513,11 +513,6 @@ | |||
| 513 | ;; Operation called in current buffer when opening a file. This can | 513 | ;; Operation called in current buffer when opening a file. This can |
| 514 | ;; be used by the backend to setup some local variables it might need. | 514 | ;; be used by the backend to setup some local variables it might need. |
| 515 | ;; | 515 | ;; |
| 516 | ;; - find-file-not-found-hook () | ||
| 517 | ;; | ||
| 518 | ;; Operation called in current buffer when opening a non-existing file. | ||
| 519 | ;; By default, this asks the user if she wants to check out the file. | ||
| 520 | ;; | ||
| 521 | ;; - extra-menu () | 516 | ;; - extra-menu () |
| 522 | ;; | 517 | ;; |
| 523 | ;; Return a menu keymap, the items in the keymap will appear at the | 518 | ;; Return a menu keymap, the items in the keymap will appear at the |