]> code.delx.au - gnu-emacs/blobdiff - man/search.texi
*** empty log message ***
[gnu-emacs] / man / search.texi
index 4afcba837e96577023a107fc849c7a5879606d2d..0a8a46ffb26e62508c59676e1581709ef0f08cce 100644 (file)
@@ -372,9 +372,9 @@ specify is empty.  (Such an empty argument would otherwise be
 useless.)  But it does not call @code{search-forward} right away.  First
 it checks the next input character to see if is @kbd{C-w},
 which specifies a word search.
-@ifinfo
+@ifnottex
 @xref{Word Search}.
-@end ifinfo
+@end ifnottex
 @kbd{C-r @key{RET}} does likewise, for a reverse incremental search.
 
 @findex search-forward
@@ -689,7 +689,7 @@ never remove the special meaning of @samp{-} or @samp{]}.  So you
 should not quote these characters when they have no special meaning
 either.  This would not clarify anything, since backslashes can
 legitimately precede these characters where they @emph{have} special
-meaning, as in @code{[^\]} (@code{"[^\\]"} for Lisp string syntax),
+meaning, as in @samp{[^\]} (@code{"[^\\]"} for Lisp string syntax),
 which matches any single character except a backslash.
 
 @node Regexp Backslash
@@ -750,8 +750,10 @@ 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.  This is called 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 +1004,17 @@ 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}.  (This is called 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}
@@ -1292,7 +1296,7 @@ through multiple buffers.  It asks you to specify the buffer names one by one.
 @item M-x multi-occur-in-matching-buffers @key{RET} @var{bufregexp} @key{RET} @var{regexp} @key{RET}
 This function is similar to @code{multi-occur}, except the buffers to
 search are specified by a regular expression that matches visited
-filenames.  With a prefix argument, it uses the regular expression to match
+file names.  With a prefix argument, it uses the regular expression to match
 buffer names instead.
 
 @item M-x how-many @key{RET} @var{regexp} @key{RET}