1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-29 07:58:21 +00:00

org-link-abbrev-alist: Fix :safe predicate

* lisp/ol.el (org-link-abbrev-alist): Check every element in the
alist when considering :safe values.

Reported-by: Qiantan Hong <qthong@stanford.edu>
Link: https://orgmode.org/list/950326F5-F72D-4F51-A946-F37E96971B08@stanford.edu
This commit is contained in:
Ihor Radchenko 2023-02-08 16:44:34 +03:00
parent c8a5fef910
commit 6cbbf4cdbf
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -274,10 +274,14 @@ See the manual for examples."
(choice
(string :tag "Format")
(function))))
:safe (lambda (val)
:safe (lambda (alist)
(when (listp alist)
(catch :unsafe
(dolist (val alist)
(pcase val
(`(,(pred stringp) . ,(pred stringp)) t)
(_ nil))))
(_ (throw :unsafe nil))))
t))))
(defgroup org-link-follow nil
"Options concerning following links in Org mode."