[Top][All Lists]

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

bug#26623: 24.5; bad variable name: `inside-post-command-hook'

From: Drew Adams
Subject: bug#26623: 24.5; bad variable name: `inside-post-command-hook'
Date: Wed, 26 Apr 2017 06:39:18 -0700 (PDT)

> > 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 via email to

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