[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: doc on define-minor-mode hook variable(s)
From: |
Drew Adams |
Subject: |
RE: doc on define-minor-mode hook variable(s) |
Date: |
Sun, 5 Mar 2006 13:14:50 -0800 |
> exiting the mode. What's not clear from this doc is whether
> `define-minor-mode' creates a variable named `MODE-hook'.
Here is the explanation: a hook is not a *variable* but a *symbol*.
A hook has various elements, all of which happen to be
currently stored in the value part of the symbol (some in the
buffer-local parts, others in the global part).
So whether or not a variable is created is not really relevant:
the symbol is "created" and that's all that's needed.
PS: Yes, this means that the only way to figure out whether a
hook exists or not is by actually placing something on it and
checking whether/when it gets triggered. That's how hooks have
been defined.
OK, thanks for the clarification.
I don't see how that substantially alters my point (or even most of what I
wrote): more should be said about the hook _symbol_ `MODE-hook' in the doc.
Users should be informed how they can take advantage of this feature.
My concern is not really whether or not these hooks exist. My concern is
that they are provided for by `define-minor-mode' but the behavior related
to them is not sufficiently documented. IOW, important functionality
provided by `define-minor-mode' is not revealed by the doc.
- doc on define-minor-mode hook variable(s), Drew Adams, 2006/03/05
- Re: doc on define-minor-mode hook variable(s), Stefan Monnier, 2006/03/05
- RE: doc on define-minor-mode hook variable(s),
Drew Adams <=
- Re: doc on define-minor-mode hook variable(s), Stefan Monnier, 2006/03/05
- RE: doc on define-minor-mode hook variable(s), Drew Adams, 2006/03/05
- Re: doc on define-minor-mode hook variable(s), Stefan Monnier, 2006/03/06
- Re: doc on define-minor-mode hook variable(s), Richard Stallman, 2006/03/06
- Re: doc on define-minor-mode hook variable(s), Stefan Monnier, 2006/03/06
- Re: doc on define-minor-mode hook variable(s), Kevin Rodgers, 2006/03/08
- RE: doc on define-minor-mode hook variable(s), Drew Adams, 2006/03/06