aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2020-05-23 09:33:41 -0400
committerStefan Monnier2020-05-23 09:33:41 -0400
commitd6a0b66a0cf44389c7474a60dd23cbf666e78537 (patch)
treece2b476c86594829113ac2b97ed5245d9db0b938
parent1a6d59eebaff919b38792450edfae7912f6639b3 (diff)
downloademacs-d6a0b66a0cf44389c7474a60dd23cbf666e78537.tar.gz
emacs-d6a0b66a0cf44389c7474a60dd23cbf666e78537.zip
* lisp/subr.el (save-match-data): Clarify use in docstring
-rw-r--r--lisp/subr.el6
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.
4091The value returned is the value of the last form in BODY." 4091The value returned is the value of the last form in BODY.
4092NOTE: The convention in Elisp is that any function, except for a few
4093exceptions like car/assoc/+/goto-char, can clobber the match data,
4094so `save-match-data' should normally be used to save *your* match data
4095rather 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.