[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing

From: Michael Heerdegen
Subject: bug#11342: 24.1.50; HOOK variable name in `add-hook' etc. confusing
Date: Thu, 26 Apr 2012 04:07:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> > You could misinterpret that and think that the first argument must
> > be a value representing a hook.  But actually it must be a _symbol_
> > holding a hook.
> Hooks are represented by a value which is a symbol (and which in turn
> carries the various functions added to it globally and in each buffer).
> The symbol's value (usually a list) is *not* the hook value but only one
> part of it.

Thanks for the clarification, I didn't realize that, obviously.

The manual sometimes calls these values being symbols "hook", and
sometimes "hook variable".

Ok, so, these arguments of `add-hook' and `remove-hook' must be
variables (symbols) representing a hook.

My proposal to rename the `hook' argument to `hook-var' would still be
reasonable.  Sure, there is no error in the current naming.  But it
would not be false, and clearer than now for people that didn't yet
realize this part of the nomenclature, like me.

Please decide yourself - I just have the feeling that many people
stumble at that point and don't know if they must use a quote before the
hook variable or not.

OTOH, if there are good reasons to reject my proposal, please close this



reply via email to

[Prev in Thread] Current Thread [Next in Thread]