mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-05 09:42:55 +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)))))
|
||||
(file
|
||||
(and (string-match "^\\(\".+?\"\\|\\S-+\\)\\(?:\\s-+\\|$\\)" value)
|
||||
(prog1
|
||||
(save-match-data
|
||||
(let ((matched (match-string 1 value))
|
||||
stripped)
|
||||
(when (string-match "\\(::\\(.*?\\)\\)\"?\\'"
|
||||
matched)
|
||||
(setq location (match-string 2 matched))
|
||||
(setq matched
|
||||
(replace-match "" nil nil matched 1)))
|
||||
(setq stripped (org-strip-quotes matched))
|
||||
(if (org-url-p stripped)
|
||||
stripped
|
||||
(expand-file-name stripped dir))))
|
||||
(setq value (replace-match "" nil nil value)))))
|
||||
(let ((matched (match-string 1 value)) stripped)
|
||||
(setq value (replace-match "" nil nil value))
|
||||
(when (string-match "\\(::\\(.*?\\)\\)\"?\\'"
|
||||
matched)
|
||||
(setq location (match-string 2 matched))
|
||||
(setq matched
|
||||
(replace-match "" nil nil matched 1)))
|
||||
(setq stripped (org-strip-quotes matched))
|
||||
(if (org-url-p stripped)
|
||||
stripped
|
||||
(expand-file-name stripped dir)))))
|
||||
(only-contents
|
||||
(and (string-match ":only-contents *\\([^: \r\t\n]\\S-*\\)?"
|
||||
value)
|
||||
|
|
Loading…
Reference in a new issue