Commit 1fa0de2c authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(add-hook): Use byte-code-function-p, not compiled-function-p.

parent 8a288450
......@@ -621,7 +621,7 @@ function, it is changed to a list of functions."
(and (local-variable-if-set-p hook)
(not (memq t (symbol-value hook)))))
;; Alter the local value only.
(or (if (or (consp function) (compiled-function-p function))
(or (if (or (consp function) (byte-code-function-p function))
(member function (symbol-value hook))
(memq function (symbol-value hook)))
(set hook
......@@ -630,7 +630,7 @@ function, it is changed to a list of functions."
(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 (or (consp function) (compiled-function-p function))
(or (if (or (consp function) (byte-code-function-p function))
(member function (default-value hook))
(memq function (default-value hook)))
(set-default hook
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment