aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2015-08-17 23:46:38 -0700
committerPaul Eggert2015-08-17 23:47:46 -0700
commit7a68ebe0485d049a3fbbfd77d0ba5773e8e6ae87 (patch)
tree74c44f9cd2bedff09c0b6746078608b1c1be8fd2 /doc
parent9a1175cb0a33aeb13601ae8997931a853cb45249 (diff)
downloademacs-7a68ebe0485d049a3fbbfd77d0ba5773e8e6ae87.tar.gz
emacs-7a68ebe0485d049a3fbbfd77d0ba5773e8e6ae87.zip
Clarify what happens to match data on failure
Problem reported by Ernesto Alfonso (Bug#21279). * doc/lispref/searching.texi (Regexp Search, Simple Match Data): Document more carefully what happens to match data after a failed search. * src/search.c (Fmatch_beginning, Fmatch_end): Document that the return value is undefined if the last search failed. (Fmatch_data): Simplify doc string line 1.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/searching.texi7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 5a05c7c729d..60360cb98a9 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -1102,7 +1102,7 @@ For example,
1102The index of the first character of the 1102The index of the first character of the
1103string is 0, the index of the second character is 1, and so on. 1103string is 0, the index of the second character is 1, and so on.
1104 1104
1105After this function returns, the index of the first character beyond 1105If this function finds a match, the index of the first character beyond
1106the match is available as @code{(match-end 0)}. @xref{Match Data}. 1106the match is available as @code{(match-end 0)}. @xref{Match Data}.
1107 1107
1108@example 1108@example
@@ -1425,8 +1425,9 @@ has no text properties.
1425@end defun 1425@end defun
1426 1426
1427@defun match-beginning count 1427@defun match-beginning count
1428This function returns the position of the start of the text matched by the 1428If the last regular expression search found a match, this function
1429last regular expression searched for, or a subexpression of it. 1429returns the position of the start of the matching text or of a
1430subexpression of it.
1430 1431
1431If @var{count} is zero, then the value is the position of the start of 1432If @var{count} is zero, then the value is the position of the start of
1432the entire match. Otherwise, @var{count} specifies a subexpression in 1433the entire match. Otherwise, @var{count} specifies a subexpression in