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

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

bug#50895: 28.0.50; show-paren-mode is distracting in some modes


From: Dmitry Gutov
Subject: bug#50895: 28.0.50; show-paren-mode is distracting in some modes
Date: Thu, 30 Sep 2021 14:19:47 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 30.09.2021 09:45, Lars Ingebrigtsen wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:

Unlike font-lock-global-mode, it seems in this case the code will be
checking show-paren-global-modes at runtime (inside
show-paren-function, I guess).

Looking at show-paren-mode again -- I thought we'd agreed to make it a
globalized minor mode instead of a global minor mode?  I.e., define it
with `define-globalized-minor-mode'.  Did that prove to be difficult to
do (i.e., not backwards-compatible)?

The current implementation seems both more efficient (which is good for an on-by-default mode) and actually easier to do, due to how show-paren-mode works.

If we do that, then we'd define it exactly like global-font-lock-mode is
defined (with the turn-on-paren-mode-if-desired logic).

We don't really have buffer-local timers, AFAIK. So the same nuances should apply.

The new var, if we add it now, should probably be just t by default.

To avoid changing the behavior for those who customized
show-paren-mode for many years, and yet allow an easy customization
point for others who can by annoyed with the change.

I don't see why the default value of a new `paren-mode-global-modes'
variable would affect people who are saying (show-paren-mode 1) in their
init files?  It should only affect those who haven't made any such
customisation already.

The value of font-lock-global-modes affects how global-font-lock-mode works.





reply via email to

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