From: Drew Adams <drew.adams@oracle.com>
To: Stefan Kangas <stefankangas@gmail.com>,
Lars Ingebrigtsen <larsi@gnus.org>
Cc: 25581@debbugs.gnu.org
Subject: bug#25581: 25.1; Incorrect statement in (elisp) `Hooks'
Date: Mon, 24 Aug 2020 09:18:27 -0700 (PDT) [thread overview]
Message-ID: <9a1b7301-09fd-4df0-be17-e20b4ebbe36e@default> (raw)
In-Reply-To: <CADwFkmnNsJMRQQ+vhVcCMJoj2OudQku39xzgXnWmZcbUHxhdvA@mail.gmail.com>
> I think the confusing thing here is that there are two ways to modify
> these single function hooks: setq and add-function.
`setq' can always be used to change a variable's value.
But that doesn't mean it's always the best thing to use.
See earlier posts in this thread, about variables whose
value is a "single function". They can be hooks, but
need not be hooks (and this, regardless of their names).
Some vars are _intended_ to only ever have a single
function as their value. Some vars are _intended_ to
have a value that can be a single function or a list of
functions. Some of the latter kind of variables are
hooks. (Maybe _all_ of the latter can be treated as
hooks; maybe not.)
`add-hook' is the best way to add a function to a hook.
This is so, regardless of its name. That you can use
`setq' or something else instead doesn't make that TRT.
next prev parent reply other threads:[~2020-08-24 16:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-30 16:51 bug#25581: 25.1; Incorrect statement in (elisp) `Hooks' Drew Adams
2017-01-31 3:05 ` npostavs
2017-01-31 3:36 ` Mark Oteiza
2017-01-31 4:06 ` Drew Adams
2017-01-31 3:55 ` Drew Adams
2017-01-31 4:16 ` npostavs
2017-01-31 16:02 ` Drew Adams
2017-02-01 3:35 ` npostavs
2017-02-01 17:01 ` Drew Adams
2017-02-04 21:00 ` npostavs
2017-02-05 2:11 ` Drew Adams
2017-02-10 1:42 ` npostavs
2017-02-10 3:00 ` Drew Adams
2020-10-11 2:26 ` Lars Ingebrigtsen
2020-10-11 14:12 ` Drew Adams
2020-08-24 15:22 ` Lars Ingebrigtsen
2020-08-24 15:54 ` Stefan Kangas
2020-08-24 15:58 ` Lars Ingebrigtsen
2020-08-24 16:20 ` Drew Adams
2020-08-24 16:13 ` Drew Adams
2020-08-24 16:18 ` Drew Adams [this message]
2020-08-26 1:50 ` Richard Stallman
2020-08-26 18:27 ` Drew Adams
2020-08-24 16:01 ` Drew Adams
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=9a1b7301-09fd-4df0-be17-e20b4ebbe36e@default \
--to=drew.adams@oracle.com \
--cc=25581@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=stefankangas@gmail.com \
/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.