]> git.eshelyaron.com Git - emacs.git/commitdiff
(Regexp Backslash, Regexp Replace): Add index entries for ``back reference''
authorEli Zaretskii <eliz@gnu.org>
Wed, 12 Apr 2006 13:40:23 +0000 (13:40 +0000)
committerEli Zaretskii <eliz@gnu.org>
Wed, 12 Apr 2006 13:40:23 +0000 (13:40 +0000)
and mention the term itself in the text.

man/ChangeLog
man/search.texi

index e084c379762dd939d24513306ce7460ac06dddf6..c99c487ee3c2523bd9a385ba2d6bf79bd14a33cf 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * search.texi (Regexp Backslash, Regexp Replace): Add index
+       entries for ``back reference'' and mention the term itself in the
+       text.
+
 2006-04-11  Richard Stallman  <rms@gnu.org>
 
        * custom.texi (Safe File Variables):
index a38f56e3f26a33d629ea1cf5af39a8999b380d16..ab109445091e052df1e60efcb4601009bbb61872 100644 (file)
@@ -750,8 +750,9 @@ can add groups for syntactic purposes without interfering with
 the numbering of the groups that are meant to be referred to.
 
 @item \@var{d}
+@cindex back reference, in regexp
 matches the same text that matched the @var{d}th occurrence of a
-@samp{\( @dots{} \)} construct.
+@samp{\( @dots{} \)} construct (a.k.a.@: @dfn{back reference}).
 
 After the end of a @samp{\( @dots{} \)} construct, the matcher remembers
 the beginning and end of the text matched by that construct.  Then,
@@ -1002,15 +1003,16 @@ any match for a specified pattern.
 Replace every match for @var{regexp} with @var{newstring}.
 @end table
 
+@cindex back reference, in regexp replacement
   In @code{replace-regexp}, the @var{newstring} need not be constant:
 it can refer to all or part of what is matched by the @var{regexp}.
 @samp{\&} in @var{newstring} stands for the entire match being
 replaced.  @samp{\@var{d}} in @var{newstring}, where @var{d} is a
 digit, stands for whatever matched the @var{d}th parenthesized
-grouping in @var{regexp}.  @samp{\#} refers to the count of
-replacements already made in this command, as a decimal number.  In
-the first replacement, @samp{\#} stands for @samp{0}; in the second,
-for @samp{1}; and so on.  For example,
+grouping in @var{regexp} (a.k.a.@: ``back reference'').  @samp{\#}
+refers to the count of replacements already made in this command, as a
+decimal number.  In the first replacement, @samp{\#} stands for
+@samp{0}; in the second, for @samp{1}; and so on.  For example,
 
 @example
 M-x replace-regexp @key{RET} c[ad]+r @key{RET} \&-safe @key{RET}