From 552eb607925c30edb27e0ee0aecec6251e02bac1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 3 Nov 2003 14:44:48 +0000 Subject: [PATCH] (add-hook): Fix last change. --- lisp/subr.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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. -- 2.39.2