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

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

Re: hooks, again


From: Stefan Monnier
Subject: Re: hooks, again
Date: Wed, 06 May 2015 18:30:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> The difference is that it is easier to see what the
> hook is, it is more convenient and faster to remove
> and add stuff, the code is less bulky, and when
> experimenting to get a desired behavior you neither
> have to remove failed attempts or worry that (if left
> behind) they will interfere with what you try to do.

FWIW, I think you feel this need because you do things like

   (setq foo-hook '(a b c))

whereas I do

   (defun sm-foo-hook ()
     (a)
     (b)
     (c))
   (add-hook 'foo-hook 'sm-foo-hook)

So I get the same property as you do (i.e. re-evaluating the code will
properly change the behavior).


        Stefan




reply via email to

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