emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parenthesis matching should consider the kind of parenthesis during


From: Herman , Géza
Subject: Re: Parenthesis matching should consider the kind of parenthesis during pair-search
Date: Mon, 12 Feb 2024 14:10:06 +0100


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 via email to

[Prev in Thread] Current Thread [Next in Thread]