changeset 60678:b41b3abcbecf

(String Search, Regexp Search, Regexp Search): Cleanups.
author Richard M. Stallman <rms@gnu.org>
date Thu, 17 Mar 2005 23:28:42 +0000
parents 0daf01e514e4
children 48eb1c71ba69
files lispref/searching.texi
diffstat 1 files changed, 19 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/searching.texi	Thu Mar 17 23:24:51 2005 +0000
+++ b/lispref/searching.texi	Thu Mar 17 23:28:42 2005 +0000
@@ -136,9 +136,9 @@
 @end group
 @end example
 
-If @var{limit} is non-@code{nil} (it must be a position in the current
-buffer), then it is the upper bound to the search.  The match found must
-not extend after that position.
+If @var{limit} is non-@code{nil}, it must be a position in the current
+buffer; it specifies the upper bound to the search.  The match found
+must not extend after that position.
 
 If @var{noerror} is @code{nil}, then @code{word-search-forward} signals
 an error if the search fails.  If @var{noerror} is @code{t}, then it
@@ -844,15 +844,15 @@
 @var{regexp}, and leaves point at the end of the first match found.
 It returns the new value of point.
 
-If @var{limit} is non-@code{nil} (it must be a position in the current
-buffer), then it is the upper bound to the search.  No match extending
-after that position is accepted.
+If @var{limit} is non-@code{nil}, it must be a position in the current
+buffer.  It specifies the upper bound to the search.  No match
+extending after that position is accepted.
 
-If @var{repeat} is supplied (it must be a positive number), then the
-search is repeated that many times (each time starting at the end of the
-previous time's match).  If all these successive searches succeed, the
-function succeeds, moving point and returning its new value.  Otherwise
-the function fails.
+If @var{repeat} is supplied, it must be a positive number; the search
+is repeated that many times; each repetition starts at the end of the
+previous match.  If all these successive searches succeed, the
+function succeeds, moving point and returning its new value.
+Otherwise the function fails.
 
 What happens when the function fails depends on the value of
 @var{noerror}.  If @var{noerror} is @code{nil}, a @code{search-failed}
@@ -1004,10 +1004,14 @@
 @defvar search-spaces-regexp
 If this variable is non-@code{nil}, it should be a regular expression
 that says how to search for whitespace.  In that case, any group of
-spaces within in a regular expression being searched for stands for
-use of this regular expression.  However, spaces inside of constructs
-such as @samp{[@dots{}]} and @samp{*}, @samp{+}, @samp{?} are not
-affected by @code{search-spaces-regexp}.
+spaces in a regular expression being searched for stands for use of
+this regular expression.  However, spaces inside of constructs such as
+@samp{[@dots{}]} and @samp{*}, @samp{+}, @samp{?} are not affected by
+@code{search-spaces-regexp}.
+
+Since this variable affects all regular expression search and match
+constructs, you should bind it temporarily for as small as possible
+a part of the code.
 @end defvar
 
 @node POSIX Regexps