all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Parenthesis matching should consider the kind of parenthesis during pair-search
@ 2024-02-12 11:49 Herman, Géza
  2024-02-12 12:34 ` Joost Kremers
  2024-02-12 12:58 ` Alan Mackenzie
  0 siblings, 2 replies; 8+ messages in thread
From: Herman, Géza @ 2024-02-12 11:49 UTC (permalink / raw)
  To: emacs-devel

Hi all,

Emacs parenthesis matching works differently than I'd have 
expected (what show-paren-mode shows).  As I understand it, it 
searches for the matching pair by not considering the kind of the 
parenthesis (no matter whether it's a curly/square/etc bracket). 
And after it found it, then it considers the kind, and if there is 
a mismatch then it is shown in red.  Usually this is not a 
problem, because parentheses come in pairs which are usually 
nested.  But if this is not true, then Emacs works unexpectedly in 
my opinion.  See this Makefile example: "$(info })" (this prints a 
} to stdout).  In this case, emacs shows } as the "matching" pair 
of the (.  And as the kind doesn't match, it's a mismatch.  But 
I'd have expected that the pair of ( is the ), and } doesn't have 
a matching pair (because this is what actually happens in this 
example).

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)

Thanks,
Geza



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-12 16:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.