Subject: bug#78865: 31.0.50; Inconsistency between show-paren-mode and some cursor-movement commands

From: Eli Zaretskii <[email-masked]>
Date: Mon, 23 Jun 2025 14:17:24 +0300

> From: Dani Moncayo <[email-masked]>
> Date: Sun, 22 Jun 2025 20:53:39 +0200
> 
> Consider a C source file like the one created with the shell command below [1].
> 
> If I visit that file with Emacs and move the cursor just before the
> "[", I see that both square brackets are highlighted -- perfect.
> 
> But then, if I type C-M-n from that point, I'd expect the cursor to
> jump from the "[" to the "]".  Well, it does not. Instead, the cursor
> jumps just after "f1()".

Why do you expect C-M-n to do that when the brackets are in comments?
That's not what C-M-n and its ilk are about: they allow to move by
code chunks, not by arbitrary text fragments.

Try this with brackets in code, and I think you will see the behavior
you expect.