diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-04-15 21:54:15 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-04-15 21:54:15 +0000 |
commit | 80d7cdca53f26dfd282c654eadeda63e0ca09715 (patch) | |
tree | d8bc8690b0aecd9aa4a28b2ea59ea682dbb49684 /doc/lispref | |
parent | b0f439fc190963f329b221678c8c495011df834b (diff) | |
download | emacs-80d7cdca53f26dfd282c654eadeda63e0ca09715.tar.gz |
* searching.texi (Regexp Backslash): Also refer to shy groups as
non-capturing or unnumbered groups.
(Regexp Functions): Add cross-reference to Regexp Backslash.
Diffstat (limited to 'doc/lispref')
-rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
-rw-r--r-- | doc/lispref/searching.texi | 17 |
2 files changed, 15 insertions, 6 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 073bdc41842..8cb1e0206b3 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,9 @@ 2009-04-15 Chong Yidong <cyd@stupidchicken.com> + * searching.texi (Regexp Backslash): Also refer to shy groups as + non-capturing or unnumbered groups. + (Regexp Functions): Add cross-reference to Regexp Backslash. + * display.texi (Truncation): Overlays can use line-prefix and wrap-prefix too. (Overlay Properties): Document wrap-prefix and line-prefix. diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index bc223f8ac3f..9c9b60fb201 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -654,14 +654,19 @@ occasionally there is a conflict, and that led to the introduction of shy groups. @item \(?: @dots{} \) +@cindex shy groups +@cindex non-capturing group +@cindex unnumbered group is the @dfn{shy group} construct. A shy group serves the first two purposes of an ordinary group (controlling the nesting of other operators), but it does not get a number, so you cannot refer back to -its value with @samp{\@var{digit}}. +its value with @samp{\@var{digit}}. Shy groups are particularly +useful for mechanically-constructed regular expressions, because they +can be added automatically without altering the numbering of ordinary, +non-shy groups. -Shy groups are particularly useful for mechanically-constructed regular -expressions because they can be added automatically without altering the -numbering of any ordinary, non-shy groups. +Shy groups are also called @dfn{non-capturing} or @dfn{unnumbered +groups}. @item \(?@var{num}: @dots{} \) is the @dfn{explicitly numbered group} construct. Normal groups get @@ -939,8 +944,8 @@ regular expression which is equivalent to the actual value @defun regexp-opt-depth regexp This function returns the total number of grouping constructs -(parenthesized expressions) in @var{regexp}. (This does not include -shy groups.) +(parenthesized expressions) in @var{regexp}. This does not include +shy groups (@pxref{Regexp Backslash}). @end defun @node Regexp Search |