aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorDave Love <[email protected]>1998-09-21 17:57:46 +0000
committerDave Love <[email protected]>1998-09-21 17:57:46 +0000
commitcf4a60a3195679829bdc1bde95598420f780bc77 (patch)
tree96324597dbba18b88accf76051663774d45f578e /lisp/subr.el
parent6ec74fd45abd30167de0c40e6ffd848a213f0e55 (diff)
(remove-hook): Check list values to avoid errors.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 826f52a85f..f92e78d9af 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -653,7 +653,8 @@ To make a hook variable buffer-local, always use
;; Detect the case where make-local-variable was used on a hook
;; and do what we used to do.
(and (local-variable-p hook)
- (not (memq t (symbol-value hook)))))
+ (consp (symbol-value hook))
+ (not (memq t (symbol-value hook)))))
(let ((hook-value (symbol-value hook)))
(if (consp hook-value)
(if (member function hook-value)
@@ -662,7 +663,7 @@ To make a hook variable buffer-local, always use
(setq hook-value nil)))
(set hook hook-value))
(let ((hook-value (default-value hook)))
- (if (consp hook-value)
+ (if (and (consp hook-value) (not (functionp hook-value)))
(if (member function hook-value)
(setq hook-value (delete function (copy-sequence hook-value))))
(if (equal hook-value function)