summaryrefslogtreecommitdiff
path: root/lisp/org/org-entities.el
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2024-01-02 10:19:48 +0800
committerPo Lu <luangruo@yahoo.com>2024-01-02 10:19:48 +0800
commit083e90dd80a16c9c573f92e0f11603267d15d82b (patch)
treeb66eed2722734e556cc708e812f93662f26458ed /lisp/org/org-entities.el
parent24741d25633084101ab697ba6e28f03e1cdc8b7a (diff)
parent3204825f56040df0a783de4fc99052eabb62b84b (diff)
downloademacs-083e90dd80a16c9c573f92e0f11603267d15d82b.tar.gz
emacs-083e90dd80a16c9c573f92e0f11603267d15d82b.tar.bz2
emacs-083e90dd80a16c9c573f92e0f11603267d15d82b.zip
Merge from origin/emacs-29
3204825f560 Fix mangled Subject header field when forwarding (Bug#67360) 7591acfe38e Update to Org 9.6.15 240b4594f11 ; * etc/TODO: Add an item about 'Info-hide-note-references'. 01be4fe39d7 * doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#... 55555a6a0d1 org-protocol: Minor copy-edits to Commentary 4696869d3d5 Improve syntax highlighting for python-ts-mode
Diffstat (limited to 'lisp/org/org-entities.el')
-rw-r--r--lisp/org/org-entities.el21
1 files changed, 13 insertions, 8 deletions
diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el
index a84142f5d40..e6ed0e97c53 100644
--- a/lisp/org/org-entities.el
+++ b/lisp/org/org-entities.el
@@ -41,14 +41,19 @@
(defun org-entities--user-safe-p (v)
"Non-nil if V is a safe value for `org-entities-user'."
- (pcase v
- (`nil t)
- (`(,(and (pred stringp)
- (pred (string-match-p "\\`[a-zA-Z][a-zA-Z0-9]*\\'")))
- ,(pred stringp) ,(pred booleanp) ,(pred stringp)
- ,(pred stringp) ,(pred stringp) ,(pred stringp))
- t)
- (_ nil)))
+ (cond
+ ((not v) t)
+ ((listp v)
+ (seq-every-p
+ (lambda (e)
+ (pcase e
+ (`(,(and (pred stringp)
+ (pred (string-match-p "\\`[a-zA-Z][a-zA-Z0-9]*\\'")))
+ ,(pred stringp) ,(pred booleanp) ,(pred stringp)
+ ,(pred stringp) ,(pred stringp) ,(pred stringp))
+ t)
+ (_ nil)))
+ v))))
(defcustom org-entities-user nil
"User-defined entities used in Org to produce special characters.