aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert1993-08-27 01:57:48 +0000
committerPaul Eggert1993-08-27 01:57:48 +0000
commit6379911ca3314bd2aaf2ad1c14c7726abd86e50f (patch)
tree1592a018fc49f1fe4200887736cb3b15a2a0c3e2
parent85acbe0ab885e6bc8a27bac9876b2789c2b991bf (diff)
downloademacs-6379911ca3314bd2aaf2ad1c14c7726abd86e50f.tar.gz
emacs-6379911ca3314bd2aaf2ad1c14c7726abd86e50f.zip
(vc-find-file-hook, vc-file-not-found-hook): Use add-hook to install.
-rw-r--r--lisp/vc-hooks.el8
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 31abfc02f6f..b258a408d56 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -242,9 +242,7 @@ visiting FILE."
242 (make-local-variable 'make-backup-files) 242 (make-local-variable 'make-backup-files)
243 (setq make-backup-files nil)))) 243 (setq make-backup-files nil))))
244 244
245(or (memq 'vc-find-file-hook find-file-hooks) 245(add-hook 'find-file-hooks 'vc-find-file-hook)
246 (setq find-file-hooks
247 (cons 'vc-find-file-hook find-file-hooks)))
248 246
249;;; more hooks, this time for file-not-found 247;;; more hooks, this time for file-not-found
250(defun vc-file-not-found-hook () 248(defun vc-file-not-found-hook ()
@@ -255,9 +253,7 @@ Returns t if checkout was successful, nil otherwise."
255 (require 'vc) 253 (require 'vc)
256 (not (vc-error-occurred (vc-checkout buffer-file-name)))))) 254 (not (vc-error-occurred (vc-checkout buffer-file-name))))))
257 255
258(or (memq 'vc-file-not-found-hook find-file-not-found-hooks) 256(add-hook 'find-file-not-found-hooks 'vc-file-not-found-hook)
259 (setq find-file-not-found-hooks
260 (cons 'vc-file-not-found-hook find-file-not-found-hooks)))
261 257
262;;; Now arrange for bindings and autoloading of the main package. 258;;; Now arrange for bindings and autoloading of the main package.
263;;; Bindings for this have to go in the global map, as we'll often 259;;; Bindings for this have to go in the global map, as we'll often