From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: hooks, again
Date: Wed, 06 May 2015 05:25:21 +0200 [thread overview]
Message-ID: <87k2wmo09q.fsf@debian.uxu> (raw)
In-Reply-To: mailman.2436.1430880949.904.help-gnu-emacs@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Nothing says just because you set the hook that way
>> you cannot before you do that examine what is in
>> the hook and function by function find out what
>> they are and if you like them to be there.
>>
>> Usually there isn't much so it isn't a lot work
>> either, and besides it is a limited but nonetheless
>> good way to examine the system.
>
> And what is it again that you gained from using
> (setq foo '(bla)) over (add-hook 'foo 'bla)?
With
(setq foo-hook '(grok greed gold))
I can by inspection learn what the hook is. I don't
need the help or evaluation of the variable name or
anything. I need just bring up the definition itself
and read.
With
(add-hook 'foo 'grok)
(add-hook 'foo 'greed)
(add-hook 'foo 'gold)
I see only what functions are at that point added -
not them already there, or if any. It is also
more bulky.
With `setq' I can add and remove functions by editing
the one form (and evaluating it), without using
`add-hook' or `remove-hook' or anything at all.
--
underground experts united
http://user.it.uu.se/~embe8573
next prev parent reply other threads:[~2015-05-06 3:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 22:59 how to get around deprecated function B. T. Raven
2015-04-28 23:29 ` Emanuel Berg
2015-04-30 18:01 ` B. T. Raven
2015-05-01 1:17 ` Emanuel Berg
2015-05-01 3:55 ` hook syntax (was: Re: how to get around deprecated function) Emanuel Berg
2015-05-01 4:06 ` Emanuel Berg
2015-05-03 23:54 ` hook syntax Stefan Monnier
[not found] ` <mailman.2274.1430697294.904.help-gnu-emacs@gnu.org>
2015-05-05 2:07 ` --batch on many files without reloading config (was: Re: hook syntax) Emanuel Berg
2015-05-05 11:28 ` --batch on many files without reloading config Stefan Monnier
2015-05-05 16:45 ` hooks, again (was: Re: --batch on many files without reloading config) Emanuel Berg
2015-05-05 22:09 ` hooks, again Stefan Monnier
[not found] ` <mailman.2431.1430863781.904.help-gnu-emacs@gnu.org>
2015-05-06 0:05 ` Emanuel Berg
2015-05-06 2:55 ` Stefan Monnier
[not found] ` <mailman.2436.1430880949.904.help-gnu-emacs@gnu.org>
2015-05-06 3:25 ` Emanuel Berg [this message]
2015-05-06 4:08 ` Stefan Monnier
2015-05-06 19:17 ` Emanuel Berg
2015-05-06 20:31 ` Stefan Monnier
[not found] ` <mailman.2490.1430944327.904.help-gnu-emacs@gnu.org>
2015-05-06 22:21 ` Emanuel Berg
2015-05-06 22:30 ` Stefan Monnier
[not found] ` <mailman.2504.1430951419.904.help-gnu-emacs@gnu.org>
2015-05-10 17:52 ` Emanuel Berg
2015-05-05 15:41 ` how to get around deprecated function B. T. Raven
2015-05-05 17:13 ` John Mastro
2015-05-05 17:31 ` Emanuel Berg
[not found] ` <mailman.2404.1430846015.904.help-gnu-emacs@gnu.org>
2015-05-05 17:39 ` Emanuel Berg
2015-04-29 2:55 ` Rusi
2015-04-29 22:06 ` Xavier Maillard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2wmo09q.fsf@debian.uxu \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.