aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2012-01-26 23:48:27 +0800
committerChong Yidong2012-01-26 23:48:27 +0800
commitacc28cb93b4b332053381e2cdcdab3ab8c5b73f9 (patch)
tree7bea0b3a648d03e14223fdc91b4f7b7a22db5bad /doc
parent8681f11d3b4c9e9d9b85cc997db7e091c19e6c13 (diff)
downloademacs-acc28cb93b4b332053381e2cdcdab3ab8c5b73f9.tar.gz
emacs-acc28cb93b4b332053381e2cdcdab3ab8c5b73f9.zip
Document negative repeat counts for search-forward and search-backward.
* doc/lispref/searching.texi (String Search): Document negative repeat count. * src/search.c (Fsearch_forward, Fsearch_backward): Document negative repeat counts (Bug#10507).
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/searching.texi20
2 files changed, 16 insertions, 9 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 145d2dbc4f5..89174f3ca0e 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12012-01-26 Chong Yidong <cyd@gnu.org>
2
3 * searching.texi (String Search): Document negative repeat count
4 (Bug#10507).
5
12012-01-26 Glenn Morris <rgm@gnu.org> 62012-01-26 Glenn Morris <rgm@gnu.org>
2 7
3 * variables.texi (Using Lexical Binding): 8 * variables.texi (Using Lexical Binding):
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 21481568276..3dc777897c1 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -49,7 +49,6 @@ This function searches forward from point for an exact match for
49@var{string}. If successful, it sets point to the end of the occurrence 49@var{string}. If successful, it sets point to the end of the occurrence
50found, and returns the new value of point. If no match is found, the 50found, and returns the new value of point. If no match is found, the
51value and side effects depend on @var{noerror} (see below). 51value and side effects depend on @var{noerror} (see below).
52@c Emacs 19 feature
53 52
54In the following example, point is initially at the beginning of the 53In the following example, point is initially at the beginning of the
55line. Then @code{(search-forward "fox")} moves point after the last 54line. Then @code{(search-forward "fox")} moves point after the last
@@ -91,18 +90,21 @@ The argument @var{noerror} only affects valid searches which fail to
91find a match. Invalid arguments cause errors regardless of 90find a match. Invalid arguments cause errors regardless of
92@var{noerror}. 91@var{noerror}.
93 92
94If @var{repeat} is supplied (it must be a positive number), then the 93If @var{repeat} is a positive number @var{n}, it serves as a repeat
95search is repeated that many times (each time starting at the end of the 94count: the search is repeated @var{n} times, each time starting at the
96previous time's match). If these successive searches succeed, the 95end of the previous time's match. If these successive searches
97function succeeds, moving point and returning its new value. Otherwise 96succeed, the function succeeds, moving point and returning its new
98the search fails, with results depending on the value of 97value. Otherwise the search fails, with results depending on the
99@var{noerror}, as described above. 98value of @var{noerror}, as described above. If @var{repeat} is a
99negative number -@var{n}, it serves as a repeat count of @var{n} for a
100search in the opposite (backward) direction.
100@end deffn 101@end deffn
101 102
102@deffn Command search-backward string &optional limit noerror repeat 103@deffn Command search-backward string &optional limit noerror repeat
103This function searches backward from point for @var{string}. It is 104This function searches backward from point for @var{string}. It is
104just like @code{search-forward} except that it searches backwards and 105like @code{search-forward}, except that it searches backwards rather
105leaves point at the beginning of the match. 106than forwards. Backward searches leave point at the beginning of the
107match.
106@end deffn 108@end deffn
107 109
108@deffn Command word-search-forward string &optional limit noerror repeat 110@deffn Command word-search-forward string &optional limit noerror repeat