unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26623@debbugs.gnu.org
Subject: bug#26623: 24.5; bad variable name: `inside-post-command-hook'
Date: Wed, 26 Apr 2017 06:39:18 -0700 (PDT)	[thread overview]
Message-ID: <07ad96c0-1fe7-4997-8607-837288075411@default> (raw)
In-Reply-To: <<83h91bpw7w.fsf@gnu.org>>

> > This variable's name should not end in `-hook', because that means,
> > by convention, that this is a hook variable, which it is not.
> 
> No, it's the other way around: a hook variable should have its name
> end in "-hook", but not every symbol whose name ends in "-hook" is a
> hook variable.

Clearly nothing _prevents_ a non-hook-variable symbol from having
such a perverted name as to suggest that it is a hook variable.

But that is not what the convention is for.  I don't think you
can show documentation to support such a use.

This is a perversion, which works against users.  Think `apropos'
or think completion (assuming substring or regexp matching, both
of which are possible now even with vanilla Emacs), to look for
or discover hook variables.

This particular non-hook variable works against users for this
and similar use cases - it simply gives the wrong message,
claiming loud and clear that it is a hook variable.  And to
what end?  What possible reason could we have for keeping such
a misleading name here?

> I think the name of this variable speaks very clearly for its purpose,
> and see no reason for such formalism in this case.

No, it does not speak clearly for its purpose.  Its purpose is
to be a Boolean flag for whether execution is currently inside
that hook.

Simply end the name with `-p' or `?' or some other suffix that
suggests that this is a Boolean variable.  And more importantly
does not suggest that it is a hook variable, which it is not.





       reply	other threads:[~2017-04-26 13:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<88ab0589-09f2-496d-aa02-553ab60d1d58@default>
     [not found] ` <<83h91bpw7w.fsf@gnu.org>
2017-04-26 13:39   ` Drew Adams [this message]
2017-04-26 15:37     ` bug#26623: 24.5; bad variable name: `inside-post-command-hook' Eli Zaretskii
     [not found] <<<88ab0589-09f2-496d-aa02-553ab60d1d58@default>
     [not found] ` <<<83h91bpw7w.fsf@gnu.org>
     [not found]   ` <<07ad96c0-1fe7-4997-8607-837288075411@default>
     [not found]     ` <<83lgqnnpsr.fsf@gnu.org>
2017-04-26 17:19       ` Drew Adams
2017-04-26 19:32         ` Eli Zaretskii
2017-05-10  2:10           ` npostavs
2017-05-10  6:25             ` Glenn Morris
2017-05-10  6:33               ` Glenn Morris
2017-04-23 17:00 Drew Adams
2017-04-26  5:35 ` Eli Zaretskii
2017-04-26 17:18   ` Richard Stallman
2017-04-26 18:42     ` Eli Zaretskii
2017-04-27 10:19       ` Richard Stallman
2017-05-20 23:16     ` npostavs

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=07ad96c0-1fe7-4997-8607-837288075411@default \
    --to=drew.adams@oracle.com \
    --cc=26623@debbugs.gnu.org \
    --cc=eliz@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 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).