bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#64048: 30.0.50; global-display-line-numbers-mode has no easy way to


From: Eli Zaretskii
Subject: bug#64048: 30.0.50; global-display-line-numbers-mode has no easy way to set modes where it is enabled
Date: Sat, 17 Jun 2023 21:58:04 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Ihor Radchenko <yantar92@posteo.net>,  64048@debbugs.gnu.org
> Date: Sat, 17 Jun 2023 14:30:30 -0400
> 
> > Stefan, is our current documentation of :predicate incomplete?
> 
> I'm not really familiar with that argument (AFAICT it was implemented
> by Lars in commit b8b18cf34a04a).  The whole feature puts me off a bit
> because of its name: in my world a "predicate" is a kind of function,
> so I think it's a poor name for a variable containing some list-based
> description of a set of modes.
> 
> But indeed, it seems the docstring forgets to mention that the
> `:predicate MODES` argument causes the introduction of a new variable
> called `MINOR-MODE-predicate` and whose default value is MODES.

That's mostly already documented.  What is NOT documented is that by
giving that variable a non-default value one can affect in which modes
this minor mode will be turned on and in which it will be turned off.
IOW, the fact that this variable can be used for user customizations
is not documented at all.  And your answer just hints on whether the
above is true.

>         Stefan "who'd rename the `:predicate` arg to something like
>                 `:modes` and the `MODE-predicate` variable to something
>                 like `MODE-modes`."

I guess it's too late for renaming this?





reply via email to

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