From: dkcombs@panix.com (David Combs)
Subject: cperl-mode: paren-bounce vs (dQuotes in regexps)
Date: 27 Jul 2004 01:21:12 -0400 [thread overview]
Message-ID: <ce4oo8$ec0$1@panix3.panix.com> (raw)
Subject: cperl-mode: paren-bounce vs (dQuotes in regexps)
(emacs 21.2)
$gBoundaryTag = $2 if ( $gCurLine m/^(\s+boundary="--)([0-9]+)"$/ );
Under text-mode, the above bounces fine -- leftmost "(" vs rightmost ")".
But not under cperl-mode (try it) -- you'll get the rightmost ")" matching
the 2nd-from-the-left "(".
Just to play around, I removed all double-quotes:
$gBoundaryTag = $2 if ( $gCurLine m/^(\s+boundary=--)([0-9]+)$/ );
, and it worked fine.
Here, I tried wrapping each dquote within a char-class (hoping that
doing so would "hide" it):
$gBoundaryTag = $2 if ( $gCurLine m/^(\s+boundary=["]--)([0-9]+)["]$/ );
, but nope, no such luck. Same (incorrect) matching as in the original.
Mismatching on the paren-bouncing hurts, since I (and everyone else,
I'm sure) like to rely on the paren-bouncing for detecting coding-errors.
Suggestions on how to handle this?
Thanks!
David
next reply other threads:[~2004-07-27 5:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-27 5:21 David Combs [this message]
[not found] <200407270848.i6R8mNF25697@maui.ebi.ac.uk>
2004-07-27 15:48 ` cperl-mode: paren-bounce vs (dQuotes in regexps) Pablo Marin Garcia
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ce4oo8$ec0$1@panix3.panix.com' \
--to=dkcombs@panix.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).