unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Rah Guzar <rahguzar@zohomail.eu>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 61098@debbugs.gnu.org
Subject: bug#61098: 29.0.60; Confusing behavior of show-paren-mode
Date: Tue, 31 Jan 2023 14:03:28 +0200	[thread overview]
Message-ID: <83r0va3o8f.fsf@gnu.org> (raw)
In-Reply-To: <87y1pjstse.fsf@zohomail.eu> (message from Rah Guzar on Mon, 30 Jan 2023 20:21:33 +0100)

> From: Rah Guzar <rahguzar@zohomail.eu>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 61098@debbugs.gnu.org
> Date: Mon, 30 Jan 2023 20:21:33 +0100
> 
> Hi,
>   Thanks for the patch, it works as you described.

Thanks for testing.

I'm still waiting for Stefan to help me understand why after that
patch "M-x show-paren-local-mode" _disables_ the mode rather than
enabling it.  Stefan, any wisdom?

> However I have questions about the show-paren-predicate variable.
> 
> When I see its default value  (not (derived-mode . special-mode))
> it makes me think there is some dsl involved. The customize interface
> mentions Lisp Expression as a possibility but the documentation doesn't
> explain what form this expression is supposed to take.

It should be an expression that yields a boolean value (that's why the
variable is named "predicate").  I will improve the doc string when I
install the final version of the changes.

> This makes me think that the default is just a pseudo sentence
> intended to convey what it does and there are only three
> possibilities.

No, it's a real expression in Lisp, just quoted.

> If the latter is correct, I think a simpler way would be to disable
> the mode in the body of special-mode if the value of `show-paren-predicate`
> demands it. I think this will get rid of the problem that the mode is
> disabled the first time show-paren-local-mode is called.
> 
> I am using the equivalent of this which adds a hook to special-mode-hook
> to achieve the outcome and I am pretty happy with it.

I don't think I understand what you have in mind, but let's wait for
Stefan to chime in.





  reply	other threads:[~2023-01-31 12:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 16:03 bug#61098: 29.0.60; Confusing behavior of show-paren-mode Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-28 12:20 ` Eli Zaretskii
2023-01-30 19:21   ` Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-31 12:03     ` Eli Zaretskii [this message]
2023-01-31 13:03       ` Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-31 14:13         ` Eli Zaretskii
2023-01-31 14:41           ` Dmitry Gutov
2023-01-31 22:42       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-01 17:48         ` Eli Zaretskii
2023-02-05 15:19           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-05 15:24             ` Eli Zaretskii
2023-02-05 17:21               ` Dmitry Gutov
2023-02-05 18:29                 ` Eli Zaretskii
2023-02-05 19:06                   ` Dmitry Gutov
2023-02-05 18:57                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-05 19:09                   ` Dmitry Gutov
2023-01-31  2:37   ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83r0va3o8f.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61098@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rahguzar@zohomail.eu \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).