Subject: Re: bug#5410: Parenthesis Matching Bug!!

From: Andrew Hyatt <[email-masked]>
Date: Wed, 03 Aug 2016 22:18:50 -0400

Matrix <[email-masked]> writes:

> Hello , developer! I am a student of china . I like emacs very much .
> I use it to read txt-format book(because the color-theme of my emacs is
> very good for eye!^^) . I also use emacs to coding!good~!!
>    But now I find a bug in emacs :( . May be it`s not a bug , I want to
> believe this.Now The-Bug as follow:
>
>    //      Print a message and dump core (equivalent to ASSERT(FALSE)
> without
> //      making the compiler whine).
>
>    The Parenthesis-Matching-highlight is work with the second '(' .
> yeah  , When my cursor at the second '(' the first ')' highlight . But
> when my cursor at first '(' , the second ')' doesn`t highlight and show 
> unmatch Parenthesis....I think this is wrong , It match as:  (  ( )  ).
>
>    ^^ , I like emacs , I want it  to be  more good tool for me and other
> programer!!
>    Thanks developers!!!

Hi, sorry for the late reply.

Your example reproduces for me in Emacs 25. My guess is that emacs
doesn't really assume that comment lines should be treated as a
contiguous text block. Which is sometimes right, sometimes not, in my
experience.  For example, you could have comments that are something
like:

// This function does three things:
// 1) Reverse the string
// 2) Uuencode the string
// 3) Rot-13 the string

Which certainly wouldn't make a lot of sense treated contiguously.

Does anyone have any opinions whether this is a bug or a wishlish item?