unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 36618@debbugs.gnu.org
Subject: bug#36618: 26.2; Misnamed `*-hooks' variables
Date: Sat, 13 Jul 2019 10:23:23 -0700 (PDT)	[thread overview]
Message-ID: <2b8f5747-6d20-494a-b727-fdd0b9245299@default> (raw)
In-Reply-To: <87d0ievxm5.fsf@mouse.gnus.org>

> > The following variable names end in `-hooks', instead of `-hook' or
> > `-functions' (there may be more - just noticed these in one of my
> > sessions):
> >
> > bookmark-exit-hooks                    (OBS)
> 
> As you say, there's nothing to be done about obsolete -hooks variables.
> 
> > delay-mode-hooks                       (Bool)
> 
> These bool variables have logical names -- they say whether to do
> something or other about the hooks, so I don't think they should change
> names.
> 
> > delayed-mode-hooks                     XXX
> 
> That's not really a -hook variable, but list of hook variables to run,
> so it's fine:
> 
> (defvar-local delayed-mode-hooks nil
>   "List of delayed mode hooks waiting to be run.")
> 
> > ediff-before-session-group-setup-hooks XXX
> 
> This is a variable that's never used, apparently?  I'll just mark it as
> obsolete.
> 
> > recentf-used-hooks                     XXX
> 
> It's a list of hooks, not a hook, so has a correct name.
> 
> > unload-feature-special-hooks           (aliased)
> 
> Same.
> 
> Nothing to be done for the rest; closing.

IOW, "won't fix".

Lists of hooks are not hooks.  Boolean variables that
control behavior of hooks are not hooks.

A user looking for hooks will fall upon these misleading
names of non-hooks using completion (e.g. substring).

We can help her or mislead her.  Currently we throw noise
in her face.  Not much noise - there are only a few such
anomalies cited here.





  reply	other threads:[~2019-07-13 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 15:16 bug#36618: 26.2; Misnamed `*-hooks' variables Drew Adams
2019-07-13 14:05 ` Lars Ingebrigtsen
2019-07-13 17:23   ` Drew Adams [this message]
2019-07-13 17:34     ` Eli Zaretskii
     [not found] <<aed10b21-f313-4fd1-ac95-64d5f2f49451@default>
     [not found] ` <<87d0ievxm5.fsf@mouse.gnus.org>
     [not found]   ` <<2b8f5747-6d20-494a-b727-fdd0b9245299@default>
     [not found]     ` <<83o91xzvm3.fsf@gnu.org>
2019-07-13 17:46       ` Drew Adams
2019-07-13 17:50         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b8f5747-6d20-494a-b727-fdd0b9245299@default \
    --to=drew.adams@oracle.com \
    --cc=36618@debbugs.gnu.org \
    --cc=larsi@gnus.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).