GNU bug report logs - #50895
28.0.50; show-paren-mode is distracting in some modes

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Wed, 29 Sep 2021 17:26:02 UTC

Severity: wishlist

Merged with 50894

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Jim Porter <jporterbugs <at> gmail.com>
Cc: 50895 <at> debbugs.gnu.org
Subject: bug#50895: 28.0.50; show-paren-mode is distracting in some modes
Date: Wed, 29 Sep 2021 23:02:03 +0300
On 29.09.2021 21:01, Lars Ingebrigtsen wrote:
> Jim Porter <jporterbugs <at> gmail.com> writes:
> 
>> Perhaps something akin to `font-lock-global-modes'? The help text for
>> that says:
>>
>>> If nil, means no modes have Font Lock mode automatically turned on.
>>> If t, all modes that support Font Lock mode have it automatically turned on.
>>> If a list, it should be a list of ‘major-mode’ symbol names for
>>> which Font Lock
>>> mode should be automatically turned on.  The sense of the list is
>>> negated if it
>>> begins with ‘not’.
> 
> Ah, right -- I thought I remembered that we had some kind of
> functionality for minor modes like this, but couldn't remember the
> specifics.

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).

The check should special-case buffer-local values of show-paren-mode, so 
it's still possible to enable show-paren-local-mode in buffers where 
show-paren-mode is disabled via the new variable.

>> Then the default value for `show-paren-global-modes' could be
>> `(prog-mode)' or `(prog-mode text-mode)', or even `(not
>> special-mode)', depending on one's opinions about whether
>> `show-paren-mode' makes sense for prose. That would cover both this
>> bug as well as providing an easy way for users to customize the major
>> modes where `show-paren-mode' is enabled (this is already possible
>> with `show-paren-local-mode', but it'd be a bit simpler with
>> `show-paren-global-modes').
> 
> Yes, that makes sense to me.

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 know how to avoid changing the behavior for existing users of 
this mode, unless we make the variable itself take different values (can 
we?), and have it used instead of adding show-paren-global-modes.




This bug report was last modified 2 years and 317 days ago.

Previous Next


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