]> git.eshelyaron.com Git - emacs.git/commitdiff
(add-hook): Fix last change.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 3 Nov 2003 14:44:48 +0000 (14:44 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 3 Nov 2003 14:44:48 +0000 (14:44 +0000)
lisp/subr.el

index e29c48ae7431270c1610084cb5a29b6c62effd4b..e0fdc5c0b24c350d0083d6f67fa406a73a32e8ac 100644 (file)
@@ -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.