# HG changeset patch # User Chong Yidong # Date 1239832455 0 # Node ID 4ac543a14f94d6a7498af3e7718b9cf56e9e41de # Parent 5739f357f79fae7655682d6dfac5b3b7ad250585 * searching.texi (Regexp Backslash): Also refer to shy groups as non-capturing or unnumbered groups. (Regexp Functions): Add cross-reference to Regexp Backslash. diff -r 5739f357f79f -r 4ac543a14f94 doc/lispref/ChangeLog --- a/doc/lispref/ChangeLog Wed Apr 15 18:13:41 2009 +0000 +++ b/doc/lispref/ChangeLog Wed Apr 15 21:54:15 2009 +0000 @@ -1,5 +1,9 @@ 2009-04-15 Chong Yidong + * 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 -r 5739f357f79f -r 4ac543a14f94 doc/lispref/searching.texi --- a/doc/lispref/searching.texi Wed Apr 15 18:13:41 2009 +0000 +++ b/doc/lispref/searching.texi Wed Apr 15 21:54:15 2009 +0000 @@ -654,14 +654,19 @@ 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 @@ @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