diff options
| author | Richard M. Stallman | 2005-03-17 23:28:42 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-03-17 23:28:42 +0000 |
| commit | 5bb8ca2a9004185ac6dabfbbd8988aef42502812 (patch) | |
| tree | c2d8ccac029bfc2cf469c4517c28d6472a4ced6d | |
| parent | 0a58afcd5a74b79b4674bf4145d3e42ef748a325 (diff) | |
| download | emacs-5bb8ca2a9004185ac6dabfbbd8988aef42502812.tar.gz emacs-5bb8ca2a9004185ac6dabfbbd8988aef42502812.zip | |
(String Search, Regexp Search, Regexp Search): Cleanups.
| -rw-r--r-- | lispref/searching.texi | 34 |
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 | ||
| 139 | If @var{limit} is non-@code{nil} (it must be a position in the current | 139 | If @var{limit} is non-@code{nil}, it must be a position in the current |
| 140 | buffer), then it is the upper bound to the search. The match found must | 140 | buffer; it specifies the upper bound to the search. The match found |
| 141 | not extend after that position. | 141 | must not extend after that position. |
| 142 | 142 | ||
| 143 | If @var{noerror} is @code{nil}, then @code{word-search-forward} signals | 143 | If @var{noerror} is @code{nil}, then @code{word-search-forward} signals |
| 144 | an error if the search fails. If @var{noerror} is @code{t}, then it | 144 | an 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. |
| 845 | It returns the new value of point. | 845 | It returns the new value of point. |
| 846 | 846 | ||
| 847 | If @var{limit} is non-@code{nil} (it must be a position in the current | 847 | If @var{limit} is non-@code{nil}, it must be a position in the current |
| 848 | buffer), then it is the upper bound to the search. No match extending | 848 | buffer. It specifies the upper bound to the search. No match |
| 849 | after that position is accepted. | 849 | extending after that position is accepted. |
| 850 | 850 | ||
| 851 | If @var{repeat} is supplied (it must be a positive number), then the | 851 | If @var{repeat} is supplied, it must be a positive number; the search |
| 852 | search is repeated that many times (each time starting at the end of the | 852 | is repeated that many times; each repetition starts at the end of the |
| 853 | previous time's match). If all these successive searches succeed, the | 853 | previous match. If all these successive searches succeed, the |
| 854 | function succeeds, moving point and returning its new value. Otherwise | 854 | function succeeds, moving point and returning its new value. |
| 855 | the function fails. | 855 | Otherwise the function fails. |
| 856 | 856 | ||
| 857 | What happens when the function fails depends on the value of | 857 | What 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 |
| 1005 | If this variable is non-@code{nil}, it should be a regular expression | 1005 | If this variable is non-@code{nil}, it should be a regular expression |
| 1006 | that says how to search for whitespace. In that case, any group of | 1006 | that says how to search for whitespace. In that case, any group of |
| 1007 | spaces within in a regular expression being searched for stands for | 1007 | spaces in a regular expression being searched for stands for use of |
| 1008 | use of this regular expression. However, spaces inside of constructs | 1008 | this regular expression. However, spaces inside of constructs such as |
| 1009 | such as @samp{[@dots{}]} and @samp{*}, @samp{+}, @samp{?} are not | 1009 | @samp{[@dots{}]} and @samp{*}, @samp{+}, @samp{?} are not affected by |
| 1010 | affected by @code{search-spaces-regexp}. | 1010 | @code{search-spaces-regexp}. |
| 1011 | |||
| 1012 | Since this variable affects all regular expression search and match | ||
| 1013 | constructs, you should bind it temporarily for as small as possible | ||
| 1014 | a part of the code. | ||
| 1011 | @end defvar | 1015 | @end defvar |
| 1012 | 1016 | ||
| 1013 | @node POSIX Regexps | 1017 | @node POSIX Regexps |