From: Paul Eggert Date: Fri, 27 Aug 1993 01:57:48 +0000 (+0000) Subject: (vc-find-file-hook, vc-file-not-found-hook): Use add-hook to install. X-Git-Tag: emacs-19.34~11196 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6379911ca3314bd2aaf2ad1c14c7726abd86e50f;p=emacs.git (vc-find-file-hook, vc-file-not-found-hook): Use add-hook to install. --- 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." (make-local-variable 'make-backup-files) (setq make-backup-files nil)))) -(or (memq 'vc-find-file-hook find-file-hooks) - (setq find-file-hooks - (cons 'vc-find-file-hook find-file-hooks))) +(add-hook 'find-file-hooks 'vc-find-file-hook) ;;; more hooks, this time for file-not-found (defun vc-file-not-found-hook () @@ -255,9 +253,7 @@ Returns t if checkout was successful, nil otherwise." (require 'vc) (not (vc-error-occurred (vc-checkout buffer-file-name)))))) -(or (memq 'vc-file-not-found-hook find-file-not-found-hooks) - (setq find-file-not-found-hooks - (cons 'vc-file-not-found-hook find-file-not-found-hooks))) +(add-hook 'find-file-not-found-hooks 'vc-file-not-found-hook) ;;; Now arrange for bindings and autoloading of the main package. ;;; Bindings for this have to go in the global map, as we'll often