unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Herman, Géza" <geza.herman@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: "Herman, Géza" <geza.herman@gmail.com>, emacs-devel@gnu.org
Subject: Re: Parenthesis matching should consider the kind of parenthesis during pair-search
Date: Mon, 12 Feb 2024 14:10:06 +0100	[thread overview]
Message-ID: <87mss56cgs.fsf@gmail.com> (raw)
In-Reply-To: <ZcoV6m3YhGaF37iU@ACM>


Alan Mackenzie <acm@muc.de> writes:

>> What do you think, shouldn't Emacs consider the kind of
>> parenthesis when during searching for a pair? (in other words, 
>> it
>> should ignore all other kinds of parentheses when it searches 
>> for
>> a pair)
>
> No, I don't think that.  ;-)  A lot of the time (?most of the 
> time), we
> want Emacs to point out paren mismatch errors, and that 
> alternative way
> of scanning parens would prevent this.
The only gain with the current way is that Emacs will point out 
the mismatch (considering my Makefile example), if the cursor is 
on the opening '('.  With my suggested method, it's not the 
mismatch which would be shown, but the pair of '(' would (which is 
actually a correct behavior in this case, the pair of '(' is 
indeed the ')' ).  All the other interactions would be the same. 
If you put the cursor on the '}', Emacs would still show that it 
is a paren without a pair, just like now (but instead of saying 
that its "pair" is the '(', it wouldn't show anything, because '}' 
doesn't have a pair.

Why is it a desired thing that Emacs should show some mismatching 
paren if the cursor is on a completely unrelated paren?



  reply	other threads:[~2024-02-12 13:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 11:49 Parenthesis matching should consider the kind of parenthesis during pair-search Herman, Géza
2024-02-12 12:34 ` Joost Kremers
2024-02-12 12:58 ` Alan Mackenzie
2024-02-12 13:10   ` Herman, Géza [this message]
2024-02-12 14:07     ` Alan Mackenzie
2024-02-12 14:10       ` Herman, Géza
2024-02-12 15:57         ` Alan Mackenzie
2024-02-12 16:05           ` Herman, Géza

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=87mss56cgs.fsf@gmail.com \
    --to=geza.herman@gmail.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.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 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).