diff options
| -rw-r--r-- | lispref/searching.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lispref/searching.texi b/lispref/searching.texi index 505122fdd16..e93cee42a3b 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi | |||
| @@ -1264,6 +1264,12 @@ subexpression is numbered 1, the second 2, and so on. Only regular | |||
| 1264 | expressions can have subexpressions---after a simple string search, the | 1264 | expressions can have subexpressions---after a simple string search, the |
| 1265 | only information available is about the entire match. | 1265 | only information available is about the entire match. |
| 1266 | 1266 | ||
| 1267 | Every successful search sets the match data. Therefore, you should | ||
| 1268 | query the match data immediately after searching, before calling any | ||
| 1269 | other function that might perform another search. Alternatively, you | ||
| 1270 | may save and restore the match data (@pxref{Saving Match Data}) around | ||
| 1271 | the call to functions that could perform another search. | ||
| 1272 | |||
| 1267 | A search which fails may or may not alter the match data. In the | 1273 | A search which fails may or may not alter the match data. In the |
| 1268 | past, a failing search did not do this, but we may change it in the | 1274 | past, a failing search did not do this, but we may change it in the |
| 1269 | future. So don't try to rely on the value of the match data after | 1275 | future. So don't try to rely on the value of the match data after |