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:
parent
c8a5fef910
commit
6cbbf4cdbf
12
lisp/ol.el
12
lisp/ol.el
@ -274,10 +274,14 @@ See the manual for examples."
|
||||
(choice
|
||||
(string :tag "Format")
|
||||
(function))))
|
||||
:safe (lambda (val)
|
||||
(pcase val
|
||||
(`(,(pred stringp) . ,(pred stringp)) t)
|
||||
(_ nil))))
|
||||
:safe (lambda (alist)
|
||||
(when (listp alist)
|
||||
(catch :unsafe
|
||||
(dolist (val alist)
|
||||
(pcase val
|
||||
(`(,(pred stringp) . ,(pred stringp)) t)
|
||||
(_ (throw :unsafe nil))))
|
||||
t))))
|
||||
|
||||
(defgroup org-link-follow nil
|
||||
"Options concerning following links in Org mode."
|
||||
|
Loading…
Reference in New Issue
Block a user