aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-03-17 23:28:42 +0000
committerRichard M. Stallman2005-03-17 23:28:42 +0000
commit5bb8ca2a9004185ac6dabfbbd8988aef42502812 (patch)
treec2d8ccac029bfc2cf469c4517c28d6472a4ced6d
parent0a58afcd5a74b79b4674bf4145d3e42ef748a325 (diff)
downloademacs-5bb8ca2a9004185ac6dabfbbd8988aef42502812.tar.gz
emacs-5bb8ca2a9004185ac6dabfbbd8988aef42502812.zip
(String Search, Regexp Search, Regexp Search): Cleanups.
-rw-r--r--lispref/searching.texi34
1 files changed, 19 insertions, 15 deletions
diff --git a/lispref/searching.texi b/lispref/searching.texi
index 8a4c46f1ba2..1f4a82d3f1f 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -136,9 +136,9 @@ the ball boy@point{}!"
136@end group 136@end group
137@end example 137@end example
138 138
139If @var{limit} is non-@code{nil} (it must be a position in the current 139If @var{limit} is non-@code{nil}, it must be a position in the current
140buffer), then it is the upper bound to the search. The match found must 140buffer; it specifies the upper bound to the search. The match found
141not extend after that position. 141must not extend after that position.
142 142
143If @var{noerror} is @code{nil}, then @code{word-search-forward} signals 143If @var{noerror} is @code{nil}, then @code{word-search-forward} signals
144an error if the search fails. If @var{noerror} is @code{t}, then it 144an error if the search fails. If @var{noerror} is @code{t}, then it
@@ -844,15 +844,15 @@ function skips over any amount of text that is not matched by
844@var{regexp}, and leaves point at the end of the first match found. 844@var{regexp}, and leaves point at the end of the first match found.
845It returns the new value of point. 845It returns the new value of point.
846 846
847If @var{limit} is non-@code{nil} (it must be a position in the current 847If @var{limit} is non-@code{nil}, it must be a position in the current
848buffer), then it is the upper bound to the search. No match extending 848buffer. It specifies the upper bound to the search. No match
849after that position is accepted. 849extending after that position is accepted.
850 850
851If @var{repeat} is supplied (it must be a positive number), then the 851If @var{repeat} is supplied, it must be a positive number; the search
852search is repeated that many times (each time starting at the end of the 852is repeated that many times; each repetition starts at the end of the
853previous time's match). If all these successive searches succeed, the 853previous match. If all these successive searches succeed, the
854function succeeds, moving point and returning its new value. Otherwise 854function succeeds, moving point and returning its new value.
855the function fails. 855Otherwise the function fails.
856 856
857What happens when the function fails depends on the value of 857What happens when the function fails depends on the value of
858@var{noerror}. If @var{noerror} is @code{nil}, a @code{search-failed} 858@var{noerror}. If @var{noerror} is @code{nil}, a @code{search-failed}
@@ -1004,10 +1004,14 @@ comes back" twice.
1004@defvar search-spaces-regexp 1004@defvar search-spaces-regexp
1005If this variable is non-@code{nil}, it should be a regular expression 1005If this variable is non-@code{nil}, it should be a regular expression
1006that says how to search for whitespace. In that case, any group of 1006that says how to search for whitespace. In that case, any group of
1007spaces within in a regular expression being searched for stands for 1007spaces in a regular expression being searched for stands for use of
1008use of this regular expression. However, spaces inside of constructs 1008this regular expression. However, spaces inside of constructs such as
1009such as @samp{[@dots{}]} and @samp{*}, @samp{+}, @samp{?} are not 1009@samp{[@dots{}]} and @samp{*}, @samp{+}, @samp{?} are not affected by
1010affected by @code{search-spaces-regexp}. 1010@code{search-spaces-regexp}.
1011
1012Since this variable affects all regular expression search and match
1013constructs, you should bind it temporarily for as small as possible
1014a part of the code.
1011@end defvar 1015@end defvar
1012 1016
1013@node POSIX Regexps 1017@node POSIX Regexps