Mercurial > emacs
comparison lisp/subr.el @ 63664:f29e9a430d73
(save-match-data): Add comment about using evaporate arg
to set-match-data.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 22 Jun 2005 23:16:59 +0000 |
parents | ec5194493ae9 |
children | f14d5e7e60e1 d07fdd5d7d4e b7da78284d4c |
comparison
equal
deleted
inserted
replaced
63663:c4d74e911908 | 63664:f29e9a430d73 |
---|---|
2018 (declare (indent 0) (debug t)) | 2018 (declare (indent 0) (debug t)) |
2019 (list 'let | 2019 (list 'let |
2020 '((save-match-data-internal (match-data))) | 2020 '((save-match-data-internal (match-data))) |
2021 (list 'unwind-protect | 2021 (list 'unwind-protect |
2022 (cons 'progn body) | 2022 (cons 'progn body) |
2023 ;; It is safe to free (evaporate) markers immediately here, | |
2024 ;; as Lisp programs should not copy from save-match-data-internal. | |
2023 '(set-match-data save-match-data-internal 'evaporate)))) | 2025 '(set-match-data save-match-data-internal 'evaporate)))) |
2024 | 2026 |
2025 (defun match-string (num &optional string) | 2027 (defun match-string (num &optional string) |
2026 "Return string of text matched by last search. | 2028 "Return string of text matched by last search. |
2027 NUM specifies which parenthesized expression in the last regexp. | 2029 NUM specifies which parenthesized expression in the last regexp. |