branch: externals/org commit 6cbbf4cdbf9685580b57ef664a5b5a902dca97e6 Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
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 <qth...@stanford.edu> Link: https://orgmode.org/list/950326f5-f72d-4f51-a946-f37e96971...@stanford.edu --- lisp/ol.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/ol.el b/lisp/ol.el index 9ad191c8f7..9e4781f6e7 100644 --- a/lisp/ol.el +++ b/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."