From: Shynur Xie <one.last.kiss@outlook.com>
To: "Eli Zaretskii" <eliz@gnu.org>, "Mattias Engdegård" <mattiase@acm.org>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>,
"luangruo@yahoo.com" <luangruo@yahoo.com>
Subject: Re: Bug?
Date: Thu, 4 May 2023 08:35:40 +0000 [thread overview]
Message-ID: <SA0PR04MB7433EE89B5395D2A41463DE0D76D9@SA0PR04MB7433.namprd04.prod.outlook.com> (raw)
In-Reply-To: <838re5mzcu.fsf@gnu.org>
Hi, Eli.
In my last email, I mentioned that highlighting only 1 character is
the original behavior of the function `blink-matching-open':
> From: Shynur Xie <one.last.kiss@outlook.com>
> To: Mattias Engdegård
> Cc: emacs-devel; Po Lu
>
>> I also noticed that when the closing bracket is comprised of
>> multiple characters, only the first character is high-lit using
>> that face.
>
> That is the original behavior of `blink-matching-open' -- it only
> highlights the first character. (What you expected is provided by
> `show-paren-mode'.) It uses `forward-sexp' to move point to the
> first character (in your example, it's `c`), but `forward-sexp'
> doesn't report the length of this keyword (i.e., `case`).
I also find that, the mode `show-paren-mode' (which highlights an
entire matched keyword) also emits a message "Matches %s" which will
override what `blink-matching-open' does, when that mode's own option
`show-paren-context-when-offscreen' is t.
In conclusion, before my patch was installed, by default,
`blink-matching-open' highlighted only 1 matched character when that
character is on-screen; `show-paren-mode' highlighted the entire
keyword. But both of them didn't highlight the matched off-screen
openparen shown in the echo area. After my patch was installed,
`blink-matching-open' highlights the 1st character when that character
is off-screen, as well as how it does originally when the character is
on-screen.
So I'm now wondering, would it be better to write the functionality
(highlighting an entire matched keyword when it is shown in the echo
area) into <lisp/paren.el> instead of <lisp/simple.el> (and make it a
part of `show-paren-mode')? My opinion is, if `blink-matching-open'
highlights the entire matched keyword in the echo area, why doesn't it
also highlight an entire keyword that is on-screen? But if it does,
`blink-matching-open' and `show-paren-mode' will conflict/duplicate in
function/code. If we make that functionality a part of
`show-paren-mode', not only is behavioral consistency guaranteed in
all respects, but that functionality can simply reuse the logic/code
of `show-paren-mode'.
Any suggstion? Thanks.
--
shynur
next prev parent reply other threads:[~2023-05-04 8:35 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <875y9aciir.fsf.ref@yahoo.com>
2023-05-03 1:26 ` Bug? Po Lu
2023-05-03 9:40 ` Bug? Mattias Engdegård
2023-05-03 10:12 ` Bug? Mattias Engdegård
2023-05-03 11:24 ` Bug? Shynur Xie
2023-05-03 12:27 ` Bug? Mattias Engdegård
2023-05-03 17:22 ` Bug? Juri Linkov
2023-05-03 11:24 ` Bug? Eli Zaretskii
2023-05-03 11:26 ` Bug? Shynur Xie
2023-05-04 8:35 ` Shynur Xie [this message]
2023-05-04 20:57 ` Bug? Shynur Xie
2023-05-05 4:41 ` Bug? Eli Zaretskii
2023-05-05 16:18 ` Bug? Shynur Xie
2023-05-06 10:44 ` Bug? Mattias Engdegård
2023-05-06 14:58 ` Bug? Shynur Xie
2023-05-06 15:24 ` Bug? Eli Zaretskii
2023-05-07 11:08 ` Bug? Mattias Engdegård
2023-05-07 12:05 ` Bug? Po Lu
2023-05-07 12:17 ` Bug? Eli Zaretskii
2023-05-07 12:54 ` Bug? Po Lu
2023-05-07 13:36 ` Bug? Shynur Xie
2023-05-07 13:51 ` Bug? Mattias Engdegård
2023-05-07 14:42 ` Bug? Shynur Xie
2023-05-07 15:06 ` Bug? Eli Zaretskii
2023-05-03 11:23 ` Bug? Eli Zaretskii
2017-06-20 13:38 bug? John Kitchin
2017-06-29 14:36 ` bug? Nicolas Goaziou
2017-06-30 0:53 ` bug? John Kitchin
2017-07-01 12:30 ` bug? Nicolas Goaziou
-- strict thread matches above, loose matches on Subject: below --
2014-05-06 14:47 Bug?? Susan Cragin
2014-05-06 15:28 ` Bug?? Maurice
2014-05-06 21:30 ` Bug?? Suvayu Ali
2014-05-07 16:15 ` Bug?? Achim Gratz
2014-02-06 10:15 Bug: "#+STARTUP: content" shows text as well as headlines [8.2.5h (8.2.5h-elpa @ ~/.emacs.d/elpa/org/) Paul Stansell
2014-02-06 10:42 ` Bastien
2014-02-06 11:38 ` Bastien
2014-03-06 17:32 ` Bug: Paul Stansell
2012-12-04 16:53 Bug? Charles
2012-12-04 19:12 ` Bug? Achim Gratz
2012-12-05 1:20 ` Bug? Charles
2010-05-12 12:50 bug? J. David Boyd
2010-05-12 13:35 ` bug? Bernt Hansen
2010-05-12 14:32 ` bug? J. David Boyd
2005-03-07 16:35 bug ? fg
2003-09-23 11:07 Bug? Mark Espinoza
2002-08-28 17:41 Bug? Sharon A Watkins
2002-08-29 1:38 ` Bug? Juanma Barranquero
2002-08-29 4:44 ` Bug? Eli Zaretskii
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=SA0PR04MB7433EE89B5395D2A41463DE0D76D9@SA0PR04MB7433.namprd04.prod.outlook.com \
--to=one.last.kiss@outlook.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
--cc=mattiase@acm.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.