Skip to content

Commit 6de5431

Browse files
committed
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.
1 parent 22de2e2 commit 6de5431

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lisp/org.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4587,11 +4587,11 @@ returns non-nil if any of them match."
45874587
(when (memq char '(?! ?f))
45884588
(customize-push-and-save
45894589
'org-safe-remote-resources
4590-
(list (rx string-start
4591-
(literal
4592-
(if (and (= char ?f) current-file)
4593-
(concat "file://" current-file) uri))
4594-
string-end))))
4590+
(list (concat "\\`"
4591+
(regexp-opt
4592+
(if (and (= char ?f) current-file)
4593+
(concat "file://" current-file) uri))
4594+
"\\'"))))
45954595
(prog1 (memq char '(?! ?\s ?y ?f))
45964596
(quit-window t)))))))
45974597

0 commit comments

Comments
 (0)