[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1102: Modification of patch
From: |
Phil Hagelberg |
Subject: |
bug#1102: Modification of patch |
Date: |
Mon, 06 Oct 2008 11:24:22 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Changed the patch from the initial bug report.
add-hook should allow symbols since it's reasonable to refer to
functions that haven't been defined yet.
-Phil
diff --git a/lisp/subr.el b/lisp/subr.el
index d62b38b..d315c27 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1132,6 +1132,8 @@ HOOK is void, it is first set to nil. If HOOK's value is
a single
function, it is changed to a list of functions."
(or (boundp hook) (set hook nil))
(or (default-boundp hook) (set-default hook nil))
+ (unless (or (functionp function) (symbolp function))
+ (error "`function' argument was not a function"))
(if local (unless (local-variable-if-set-p hook)
(set (make-local-variable hook) (list t)))
;; Detect the case where make-local-variable was used on a hook
- bug#1102: Modification of patch,
Phil Hagelberg <=