From: Alan Mackenzie <acm@muc.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Comment lines and matching parentheses
Date: Thu, 18 Mar 2010 21:27:59 +0000 (UTC) [thread overview]
Message-ID: <hnu5sv$23o1$1@colin2.muc.de> (raw)
In-Reply-To: d468de9d-e6d4-4528-8eda-2d8cfe20f11e@g26g2000yqn.googlegroups.com
dnquark <dnquark@gmail.com> wrote:
> What determines whether or not parentheses that are part of comments
> are included when performing paren matching?.. For instance, in C
> mode, both
> // (
> // )
> and
> foo //(
> bar //)
> are reported as mismatched parentheses. Similar behavior is observed
> in lisp mode.
> Is there a way to make emacs ignore all parentheses that are parts of
> comments?.. This behavior sometimes breaks hs-minor-mode's ability to
> fold code in buffers.
No, there isn't. A paren in a comment will only balance a matching one
in the same comment. If you're able and willing to change the source
code, you could rewrite the first example as:
/* (
) */
.
But it sounds more like there's a bug in hs-minor-mode, which you might
"want" to report.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2010-03-18 21:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 20:14 Comment lines and matching parentheses dnquark
2010-03-18 21:27 ` Alan Mackenzie [this message]
2010-03-19 2:26 ` dnquark
2010-03-18 21:29 ` David Rogoff
2010-03-18 22:43 ` Pascal J. Bourguignon
2010-03-18 23:48 ` A.Politz
2010-03-19 3:46 ` Stefan Monnier
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='hnu5sv$23o1$1@colin2.muc.de' \
--to=acm@muc.de \
--cc=help-gnu-emacs@gnu.org \
/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.