org-babel-map-inline-src-blocks: Avoid using `save-match-data'

* lisp/ob-core.el (org-babel-map-inline-src-blocks): Drop
`save-match-data' as it may be costly.
This commit is contained in:
Ihor Radchenko 2023-08-27 13:09:51 +03:00
parent b22ebf8c78
commit 99b65bb212
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 2 deletions

View File

@ -1309,9 +1309,9 @@ buffer."
(setq ,to-be-removed (current-buffer))
(goto-char (point-min))
(while (re-search-forward "src_\\S-" nil t)
(let ((,datum (save-match-data (org-element-context))))
(let ((,datum (org-element-context)))
(when (org-element-type-p ,datum 'inline-src-block)
(goto-char (match-beginning 0))
(goto-char (org-element-begin ,datum))
(let ((,end (copy-marker (org-element-end ,datum))))
,@body
(goto-char ,end)