0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-19 23:56:29 +00:00

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.
This commit is contained in:
Ihor Radchenko 2023-08-24 15:10:32 +03:00
parent d5ee33fed8
commit 7bdec435ff
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -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.