branch: externals/org commit 99b65bb2127d739f30b144bbca0b0e409bae222d Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
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. --- lisp/ob-core.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 0aacc7d5ef..dd82aa790f 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -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)