emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 99b65bb212 2/4: org-babel-map-inline-src-blocks: Av


From: ELPA Syncer
Subject: [elpa] externals/org 99b65bb212 2/4: org-babel-map-inline-src-blocks: Avoid using `save-match-data'
Date: Sun, 27 Aug 2023 06:58:10 -0400 (EDT)

branch: externals/org
commit 99b65bb2127d739f30b144bbca0b0e409bae222d
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]