[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comment lines and matching parentheses
From: |
Alan Mackenzie |
Subject: |
Re: Comment lines and matching parentheses |
Date: |
Tue, 04 May 2010 15:42:47 -0000 |
User-agent: |
tin/1.6.2-20030910 ("Pabbay") (UNIX) (FreeBSD/4.11-RELEASE (i386)) |
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).