forked from mirrors/org-mode
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:
parent
b22ebf8c78
commit
99b65bb212
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue