diff options
| author | Richard M. Stallman | 2003-02-15 19:27:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-02-15 19:27:40 +0000 |
| commit | 87bf725ea96fb3b0e6fb36fedbeb9257914525c4 (patch) | |
| tree | f83b6a8207c9cba527374a3dcbac7bec2088290a | |
| parent | 95a85681fb5c8ba01d06758e8f85ea798b3f6943 (diff) | |
| download | emacs-87bf725ea96fb3b0e6fb36fedbeb9257914525c4.tar.gz emacs-87bf725ea96fb3b0e6fb36fedbeb9257914525c4.zip | |
Clarify that match data is unpredictable after failing searches.
| -rw-r--r-- | lispref/searching.texi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lispref/searching.texi b/lispref/searching.texi index a172332e3a3..59c5a7fb16a 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi | |||
| @@ -1255,7 +1255,7 @@ just the text that matched @samp{\(ba*r\)}. | |||
| 1255 | @subsection Simple Match Data Access | 1255 | @subsection Simple Match Data Access |
| 1256 | 1256 | ||
| 1257 | This section explains how to use the match data to find out what was | 1257 | This section explains how to use the match data to find out what was |
| 1258 | matched by the last search or match operation. | 1258 | matched by the last search or match operation, if it succeeded. |
| 1259 | 1259 | ||
| 1260 | You can ask about the entire matching text, or about a particular | 1260 | You can ask about the entire matching text, or about a particular |
| 1261 | parenthetical subexpression of a regular expression. The @var{count} | 1261 | parenthetical subexpression of a regular expression. The @var{count} |
| @@ -1273,7 +1273,8 @@ only information available is about the entire match. | |||
| 1273 | 1273 | ||
| 1274 | A search which fails may or may not alter the match data. In the | 1274 | A search which fails may or may not alter the match data. In the |
| 1275 | past, a failing search did not do this, but we may change it in the | 1275 | past, a failing search did not do this, but we may change it in the |
| 1276 | future. | 1276 | future. So don't try to rely on the value of the match data after |
| 1277 | a failing search. | ||
| 1277 | 1278 | ||
| 1278 | @defun match-string count &optional in-string | 1279 | @defun match-string count &optional in-string |
| 1279 | This function returns, as a string, the text matched in the last search | 1280 | This function returns, as a string, the text matched in the last search |