From: Andrew Hyatt <ahyatt@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Matrix <min.matrix@gmail.com>, 5410@debbugs.gnu.org
Subject: bug#5410: Parenthesis Matching Bug!!
Date: Thu, 04 Aug 2016 20:17:08 +0000 [thread overview]
Message-ID: <CAM6wYYL_Eua3NR+GRAxFVR4mqKExuGaDrMKbBfKZq3PHroKsxw@mail.gmail.com> (raw)
In-Reply-To: <871t25fdkb.fsf@web.de>
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
On Wed, Aug 3, 2016 at 10:55 PM Michael Heerdegen <michael_heerdegen@web.de>
wrote:
> 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.2
>
Yes, this works to resolve the issue for me too. Are you saying it should
default to nil always, or for cc-mode? It seems like setting this to nil
might cause other issues we wouldn't want; ignoring comments usually seems
like the right thing to do.
It'd be nice, I guess, if you could just turn it to nil when in a comment.
>
> > 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.
>
>
True, I guess my point is that it'd be strange to consider this as 3
unmatched parens rather than 1 per line.
>
> Michael.
>
[-- Attachment #2: Type: text/html, Size: 2465 bytes --]
next prev parent reply other threads:[~2016-08-04 20:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 12:20 bug#5410: Parenthesis Matching Bug!! Matrix
2016-08-04 2:18 ` Andrew Hyatt
2016-08-04 2:55 ` Michael Heerdegen
2016-08-04 20:17 ` Andrew Hyatt [this message]
2016-08-04 21:47 ` Michael Heerdegen
2016-08-11 3:57 ` Andrew Hyatt
2016-08-23 15:02 ` Michael Heerdegen
2022-05-02 9:02 ` bug#5410: bug#5411: show-paren-mode and parens spread over multi-line comments Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM6wYYL_Eua3NR+GRAxFVR4mqKExuGaDrMKbBfKZq3PHroKsxw@mail.gmail.com \
--to=ahyatt@gmail.com \
--cc=5410@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=min.matrix@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.