GNU bug report logs - #64048
30.0.50; global-display-line-numbers-mode has no easy way to set modes where it is enabled

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Tue, 13 Jun 2023 14:30:03 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #8 received at 64048 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 64048 <at> debbugs.gnu.org
Subject: Re: bug#64048: 30.0.50;
 global-display-line-numbers-mode has no easy way to set modes where
 it is enabled
Date: Tue, 13 Jun 2023 18:50:47 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Date: Tue, 13 Jun 2023 14:33:39 +0000
> 
> global-display-line-numbers-mode is defined as
> 
> (define-globalized-minor-mode global-display-line-numbers-mode
>   display-line-numbers-mode display-line-numbers--turn-on)
> 
> Which unconditionally enables it when `display-line-numbers--turn-on'
> returns t.
> 
> Wouldn't it be nicer to have something like
> 
> (define-globalized-minor-mode global-display-line-numbers-mode
>   display-line-numbers-mode display-line-numbers--turn-on
>   :predicate #'display-line-numbers--turn-on)
> 
> that will also define `display-line-numbers-modes' variable that
> controls where the global mode is enabled/disabled?
> 
> Maybe it should even be the default in `define-globalized-minor-mode'
> when :predicate is not defined.
> 
> WDYT?

I think it's too late for such changes, because it will definitely
break someone's setup.




This bug report was last modified 1 year and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.