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

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

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


From: Ihor Radchenko
Subject: bug#64047: 30.0.50; global-display-line-numbers-mode has no easy way to set modes where it is enabled
Date: Tue, 13 Jun 2023 14:34:33 +0000

Hi,

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?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





reply via email to

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