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

From: Jim Porter <[email-masked]>
Date: Wed, 29 Sep 2021 10:59:04 -0700

On 9/29/2021 10:25 AM, Lars Ingebrigtsen wrote:
> I think defaulting show-paren-mode to "on" is a good change in general,
> but it's distracting in some modes.  For instance, when presenting data
> in a buffer, having point flash around when moving around in the buffer
> is not what most people will want.
> 
> (Think Gnus buffers, *Help* buffers, etc.)
> 
> Some people have been using this mode for years, though, and are fine
> with the cursor bopping around when trying to read data, so
> force-disabling it in (say) `special-mode' isn't quite the answer,
> either.
> 
> Does anybody see a way to enable it by default in non-special buffers
> only, but not explicitly switching it off in special-mode buffers for
> those that want it?

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

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