changeset 49809:4556482b5d22

Clarify that match data is unpredictable after failing searches.
author Richard M. Stallman <rms@gnu.org>
date Sat, 15 Feb 2003 19:27:40 +0000
parents 6a37bab32791
children 4fee73e6ff97
files lispref/searching.texi
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/searching.texi	Sat Feb 15 19:26:25 2003 +0000
+++ b/lispref/searching.texi	Sat Feb 15 19:27:40 2003 +0000
@@ -1255,7 +1255,7 @@
 @subsection Simple Match Data Access
 
   This section explains how to use the match data to find out what was
-matched by the last search or match operation.
+matched by the last search or match operation, if it succeeded.
 
   You can ask about the entire matching text, or about a particular
 parenthetical subexpression of a regular expression.  The @var{count}
@@ -1273,7 +1273,8 @@
 
   A search which fails may or may not alter the match data.  In the
 past, a failing search did not do this, but we may change it in the
-future.
+future.  So don't try to rely on the value of the match data after
+a failing search.
 
 @defun match-string count &optional in-string
 This function returns, as a string, the text matched in the last search