[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5410: Parenthesis Matching Bug!!
From: |
Michael Heerdegen |
Subject: |
bug#5410: Parenthesis Matching Bug!! |
Date: |
Thu, 04 Aug 2016 04:55:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Andrew Hyatt <ahyatt@gmail.com> writes:
> 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.
We are talking about `show-paren-mode', right? AFAICT this just calls
`scan-sexps' and looks if that errors or not, without doing syntactical
analysis itself.
`parse-sexp-ignore-comments' influences `scan-sexps's behavior in this
regard, and setting it to nil does change the behavior in this case for
me. I guess we could use this for a solution.
> 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.
Well, we would not loose anything in this case: parens are already shown
as mismatches now.
Michael.