changeset 22708:b9ca5d9ba49c

(add-hook): Use member if FUNCTION is a compiled function.
author Richard M. Stallman <rms@gnu.org>
date Tue, 07 Jul 1998 08:24:39 +0000
parents 4fa39e6af756
children 5fc9fd384c5c
files lisp/subr.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Mon Jul 06 22:41:48 1998 +0000
+++ b/lisp/subr.el	Tue Jul 07 08:24:39 1998 +0000
@@ -603,7 +603,7 @@
 	  (and (local-variable-if-set-p hook)
 	       (not (memq t (symbol-value hook)))))
       ;; Alter the local value only.
-      (or (if (consp function)
+      (or (if (or (consp function) (compiled-function-p function))
 	      (member function (symbol-value hook))
 	    (memq function (symbol-value hook)))
 	  (set hook 
@@ -612,7 +612,7 @@
 		 (cons function (symbol-value hook)))))
     ;; Alter the global value (which is also the only value,
     ;; if the hook doesn't have a local value).
-    (or (if (consp function)
+    (or (if (or (consp function) (compiled-function-p function))
 	    (member function (default-value hook))
 	  (memq function (default-value hook)))
 	(set-default hook