mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-16 00:10:47 +00:00
* lisp/ox.el (org-export-parse-include-value): Remove `save-match-data'
Avoid using GC-expensive `save-match-data'.
This commit is contained in:
parent
0ceb562b33
commit
5ff5ac03b6
25
lisp/ox.el
25
lisp/ox.el
|
@ -3463,20 +3463,17 @@ provided as the :unmatched parameter."
|
||||||
(setq value (replace-match "" nil nil value)))))
|
(setq value (replace-match "" nil nil value)))))
|
||||||
(file
|
(file
|
||||||
(and (string-match "^\\(\".+?\"\\|\\S-+\\)\\(?:\\s-+\\|$\\)" value)
|
(and (string-match "^\\(\".+?\"\\|\\S-+\\)\\(?:\\s-+\\|$\\)" value)
|
||||||
(prog1
|
(let ((matched (match-string 1 value)) stripped)
|
||||||
(save-match-data
|
(setq value (replace-match "" nil nil value))
|
||||||
(let ((matched (match-string 1 value))
|
(when (string-match "\\(::\\(.*?\\)\\)\"?\\'"
|
||||||
stripped)
|
matched)
|
||||||
(when (string-match "\\(::\\(.*?\\)\\)\"?\\'"
|
(setq location (match-string 2 matched))
|
||||||
matched)
|
(setq matched
|
||||||
(setq location (match-string 2 matched))
|
(replace-match "" nil nil matched 1)))
|
||||||
(setq matched
|
(setq stripped (org-strip-quotes matched))
|
||||||
(replace-match "" nil nil matched 1)))
|
(if (org-url-p stripped)
|
||||||
(setq stripped (org-strip-quotes matched))
|
stripped
|
||||||
(if (org-url-p stripped)
|
(expand-file-name stripped dir)))))
|
||||||
stripped
|
|
||||||
(expand-file-name stripped dir))))
|
|
||||||
(setq value (replace-match "" nil nil value)))))
|
|
||||||
(only-contents
|
(only-contents
|
||||||
(and (string-match ":only-contents *\\([^: \r\t\n]\\S-*\\)?"
|
(and (string-match ":only-contents *\\([^: \r\t\n]\\S-*\\)?"
|
||||||
value)
|
value)
|
||||||
|
|
Loading…
Reference in a new issue