0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:00:49 +00:00

org: Refactor rx to concat + regexp-opt

* lisp/org.el (org--confirm-resource-safe): Since Emacs 26 doesn't
support rx's (literal S) construct, use (concat (regexp-opt ...) ...)
instead.
This commit is contained in:
TEC 2022-07-24 22:03:20 +08:00
parent 22de2e26e7
commit 6de5431acc
Signed by: tec
GPG key ID: 779591AFDB81F06C

View file

@ -4587,11 +4587,11 @@ returns non-nil if any of them match."
(when (memq char '(?! ?f))
(customize-push-and-save
'org-safe-remote-resources
(list (rx string-start
(literal
(if (and (= char ?f) current-file)
(concat "file://" current-file) uri))
string-end))))
(list (concat "\\`"
(regexp-opt
(if (and (= char ?f) current-file)
(concat "file://" current-file) uri))
"\\'"))))
(prog1 (memq char '(?! ?\s ?y ?f))
(quit-window t)))))))