all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Lars Ingebrigtsen <larsi@gnus.org>, Jim Porter <jporterbugs@gmail.com>
Cc: 50895@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	[thread overview]
Message-ID: <7867800d-f770-0316-6659-7ff6f310cd57@yandex.ru> (raw)
In-Reply-To: <875yuj8dm8.fsf@gnus.org>

On 29.09.2021 21:01, Lars Ingebrigtsen wrote:
> Jim Porter <jporterbugs@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.





  reply	other threads:[~2021-09-29 20:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 17:25 bug#50895: 28.0.50; show-paren-mode is distracting in some modes Lars Ingebrigtsen
2021-09-29 17:54 ` bug#50895: [External] : " Drew Adams
2021-09-29 17:59 ` Jim Porter
2021-09-29 18:01   ` Lars Ingebrigtsen
2021-09-29 20:02     ` Dmitry Gutov [this message]
2021-09-30  6:45       ` Lars Ingebrigtsen
2021-09-30 11:19         ` Dmitry Gutov
2021-09-30 13:39           ` Lars Ingebrigtsen
2021-09-30 17:00             ` Dmitry Gutov
2021-10-01  7:30               ` Lars Ingebrigtsen
2021-09-30  9:02       ` Eli Zaretskii
2021-09-30  9:26         ` Lars Ingebrigtsen
2021-09-30 10:02           ` Eli Zaretskii
2021-09-30 17:03         ` Dmitry Gutov
2021-09-29 18:02 ` Eli Zaretskii
2021-09-29 18:03   ` Lars Ingebrigtsen
2021-09-29 18:11     ` bug#50895: [External] : " Drew Adams
2021-09-29 18:25     ` Eli Zaretskii
2021-09-29 18:31       ` Lars Ingebrigtsen
2021-09-29 18:40         ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2021-09-29 17:10 bug#50894: Disable show-paren-mode in special modes Juri Linkov
2022-09-02 12:23 ` bug#50895: 28.0.50; show-paren-mode is distracting in some modes Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7867800d-f770-0316-6659-7ff6f310cd57@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=50895@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.