* bug#1102: Modification of patch
@ 2008-10-06 18:24 Phil Hagelberg
2008-10-16 5:54 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Phil Hagelberg @ 2008-10-06 18:24 UTC (permalink / raw
To: 1102
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#1102: Modification of patch
2008-10-06 18:24 bug#1102: Modification of patch Phil Hagelberg
@ 2008-10-16 5:54 ` Glenn Morris
2008-10-16 16:09 ` Phil Hagelberg
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2008-10-16 5:54 UTC (permalink / raw
To: Phil Hagelberg; +Cc: 1102
Phil Hagelberg wrote:
> add-hook should allow symbols since it's reasonable to refer to
> functions that haven't been defined yet.
Doesn't it therefore seem a bit pointless to check? There will always
be ways to shoot oneself in the foot. I imagine many functions don't
check the type of their arguments.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#1102: Modification of patch
2008-10-16 5:54 ` Glenn Morris
@ 2008-10-16 16:09 ` Phil Hagelberg
2008-10-17 1:28 ` Stefan Monnier
2011-07-09 18:46 ` bug#1102: add-hook should check that its function arg is a function Glenn Morris
0 siblings, 2 replies; 6+ messages in thread
From: Phil Hagelberg @ 2008-10-16 16:09 UTC (permalink / raw
To: Glenn Morris
Glenn Morris <rgm@gnu.org> writes:
>> add-hook should allow symbols since it's reasonable to refer to
>> functions that haven't been defined yet.
>
> Doesn't it therefore seem a bit pointless to check? There will always
> be ways to shoot oneself in the foot. I imagine many functions don't
> check the type of their arguments.
Yeah, you're probably right; in retrospect I'm not sure why it's
necessary. Feel free to close as a wontfix.
-Phil
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#1102: Modification of patch
2008-10-16 16:09 ` Phil Hagelberg
@ 2008-10-17 1:28 ` Stefan Monnier
2008-10-17 1:35 ` Processed: " Emacs bug Tracking System
2011-07-09 18:46 ` bug#1102: add-hook should check that its function arg is a function Glenn Morris
1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2008-10-17 1:28 UTC (permalink / raw
To: Phil Hagelberg; +Cc: control, 1102
tag 1102 +wontfix
thanks
> Yeah, you're probably right; in retrospect I'm not sure why it's
> necessary. Feel free to close as a wontfix.
Thank you,
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Processed: Re: bug#1102: Modification of patch
2008-10-17 1:28 ` Stefan Monnier
@ 2008-10-17 1:35 ` Emacs bug Tracking System
0 siblings, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2008-10-17 1:35 UTC (permalink / raw
To: Stefan Monnier; +Cc: Emacs Bugs
Processing commands for control@emacsbugs.donarmstrong.com:
> tag 1102 +wontfix
bug#1102: 23.0.60; add-hook should check that its function arg is a function.
Tags were: wontfix
Tags added: wontfix
> thanks
Stopping processing here.
Please contact me if you need assistance.
Don Armstrong
(administrator, Emacs bugs database)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#1102: add-hook should check that its function arg is a function
2008-10-16 16:09 ` Phil Hagelberg
2008-10-17 1:28 ` Stefan Monnier
@ 2011-07-09 18:46 ` Glenn Morris
1 sibling, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2011-07-09 18:46 UTC (permalink / raw
To: 1102-done
I don't see a need to keep open this particular report, which was marked
"wontfix" some time ago.
Phil Hagelberg wrote:
> Yeah, you're probably right; in retrospect I'm not sure why it's
> necessary. Feel free to close as a wontfix.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-09 18:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 18:24 bug#1102: Modification of patch Phil Hagelberg
2008-10-16 5:54 ` Glenn Morris
2008-10-16 16:09 ` Phil Hagelberg
2008-10-17 1:28 ` Stefan Monnier
2008-10-17 1:35 ` Processed: " Emacs bug Tracking System
2011-07-09 18:46 ` bug#1102: add-hook should check that its function arg is a function Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.