From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: test for shy-group "feature"?
Date: Fri, 9 Dec 2005 19:42:18 -0800 [thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICGEPMCPAA.drew.adams@oracle.com> (raw)
In-Reply-To: <85ek4l208u.fsf@lola.goethe.zz>
> Emacs 22 has shy groups for regexps; previous versions did not.
Wrong.
** Regular expressions now support intervals \{n,m\} as well as
Perl's shy-groups \(?:...\) and non-greedy *? +? and ?? operators.
Also back-references like \2 are now considered as an error if the
corresponding subgroup does not exist (or is not closed yet).
Previously it would have been silently turned into `2'
(ignoring the `\').
I didn't find any reference to "shy" by grepping the source code. Thanks for
looking in News.
> When writing conditional code that tries to work with multiple Emacs
> versions, it is usually better to test fboundp, boundp, or
> featurep, than it
> is to test the major version. I couldn't find any function,
> variable, or
> feature associated with this new "feature", shy groups. Is
> there one that I
> might have missed? Thanks.
(if (string-match "\\(?:\\)" "")
...
...)
Very good (elegant - it even acts as an explanatory comment).
Thanks.
next prev parent reply other threads:[~2005-12-10 3:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.18647.1134176454.20277.help-gnu-emacs@gnu.org>
2005-12-10 1:45 ` test for shy-group "feature"? David Kastrup
2005-12-10 3:42 ` Drew Adams [this message]
2005-12-10 1:00 Drew Adams
2005-12-10 1:19 ` Lennart Borgman
2005-12-10 1:42 ` Drew Adams
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=DNEMKBNJBGPAOPIJOOICGEPMCPAA.drew.adams@oracle.com \
--to=drew.adams@oracle.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).