From 7bdec435ff5d86220d13c431e799c5ed44a57da1 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 24 Aug 2023 15:10:32 +0300 Subject: [PATCH] org-export-expand-include-keyword: Drop unnecessary call to `save-match-data' * lisp/ox.el (org-export-expand-include-keyword): Do not wrap `org-element-at-point' into `save-match-data'. The search data from `re-search-forward' is unused in the code and `save-match-data' call is costly. --- lisp/ox.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox.el b/lisp/ox.el index 5e757fd58..5926baf15 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -3401,7 +3401,7 @@ variables in include file names." (goto-char (point-min)) (while (re-search-forward include-re nil t) (unless (org-in-commented-heading-p) - (let ((element (save-match-data (org-element-at-point)))) + (let ((element (org-element-at-point))) (when (org-element-type-p element 'keyword) (forward-line 0) ;; Extract arguments from keyword's value.