From: Stefan Monnier Date: Mon, 3 Nov 2003 14:44:48 +0000 (+0000) Subject: (add-hook): Fix last change. X-Git-Tag: ttn-vms-21-2-B4~8426 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=552eb607925c30edb27e0ee0aecec6251e02bac1;p=emacs.git (add-hook): Fix last change. --- diff --git a/lisp/subr.el b/lisp/subr.el index e29c48ae743..e0fdc5c0b24 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -856,9 +856,7 @@ function, it is changed to a list of functions." (set (make-local-variable hook) (list t))) ;; Detect the case where make-local-variable was used on a hook ;; and do what we used to do. - (when (and (local-variable-p hook) - (not (and (consp (symbol-value hook)) - (memq t (symbol-value hook))))) + (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook))) (setq local t))) (let ((hook-value (if local (symbol-value hook) (default-value hook)))) ;; If the hook value is a single function, turn it into a list.