help-gnu-emacs
[Top][All Lists]
Advanced

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

hooks, again (was: Re: --batch on many files without reloading config)


From: Emanuel Berg
Subject: hooks, again (was: Re: --batch on many files without reloading config)
Date: Tue, 05 May 2015 18:45:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> OK. But is it still OK with setq and a list?
>
> No, don't use `setq' on a hook, unless you really have
> a *very* good reason and know exactly what
> it implies.

Yeah? But it seems to work as expected. In the help it
says it is recommended to use `add-hook' but also that
they are variables, and what I can see they behave
a such as well.

The reason which I wouldn't call "very good" but good
and clear enough to be spelled out is that you have
a higher degree of clarity and control because you
know from your config files explicitly what is
at work.

If you experiment to get a desired behavior with
add-hook before long you don't know what is going on
because there is no telling what leftovers from
previous (failed?) attempts may linger to cloud
the picture.

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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