[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: |
Stefan Monnier |
Subject: |
Re: doc on define-minor-mode hook variable(s) |
Date: |
Sun, 05 Mar 2006 16:01:42 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> 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.
Stefan
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.
- doc on define-minor-mode hook variable(s), Drew Adams, 2006/03/05
- Re: doc on define-minor-mode hook variable(s),
Stefan Monnier <=
- 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/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