diff options
| author | Stefan Monnier | 2020-05-23 09:33:41 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2020-05-23 09:33:41 -0400 |
| commit | d6a0b66a0cf44389c7474a60dd23cbf666e78537 (patch) | |
| tree | ce2b476c86594829113ac2b97ed5245d9db0b938 | |
| parent | 1a6d59eebaff919b38792450edfae7912f6639b3 (diff) | |
| download | emacs-d6a0b66a0cf44389c7474a60dd23cbf666e78537.tar.gz emacs-d6a0b66a0cf44389c7474a60dd23cbf666e78537.zip | |
* lisp/subr.el (save-match-data): Clarify use in docstring
| -rw-r--r-- | lisp/subr.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 33194e4ffa2..2b3231b879b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -4088,7 +4088,11 @@ MODES is as for `set-default-file-modes'." | |||
| 4088 | ;; now, but it generates slower code. | 4088 | ;; now, but it generates slower code. |
| 4089 | (defmacro save-match-data (&rest body) | 4089 | (defmacro save-match-data (&rest body) |
| 4090 | "Execute the BODY forms, restoring the global value of the match data. | 4090 | "Execute the BODY forms, restoring the global value of the match data. |
| 4091 | The value returned is the value of the last form in BODY." | 4091 | The value returned is the value of the last form in BODY. |
| 4092 | NOTE: The convention in Elisp is that any function, except for a few | ||
| 4093 | exceptions like car/assoc/+/goto-char, can clobber the match data, | ||
| 4094 | so `save-match-data' should normally be used to save *your* match data | ||
| 4095 | rather than your caller's match data." | ||
| 4092 | ;; It is better not to use backquote here, | 4096 | ;; It is better not to use backquote here, |
| 4093 | ;; because that makes a bootstrapping problem | 4097 | ;; because that makes a bootstrapping problem |
| 4094 | ;; if you need to recompile all the Lisp files using interpreted code. | 4098 | ;; if you need to recompile all the Lisp files using interpreted code. |