From: Stefan Kangas Date: Mon, 17 Feb 2025 01:04:31 +0000 (+0100) Subject: Address FIXME in org-element-create X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7cbe07063f2110346c74d8a2c0b61920e389a1b2;p=emacs.git Address FIXME in org-element-create * lisp/org/org-element-ast.el (org-element-create): Address FIXME. (cherry picked from commit b417c0abebfa68d37dd07160b81ce5f7da6dd431) --- diff --git a/lisp/org/org-element-ast.el b/lisp/org/org-element-ast.el index 5e1a93a2417..d33525b102f 100644 --- a/lisp/org/org-element-ast.el +++ b/lisp/org/org-element-ast.el @@ -735,10 +735,10 @@ a newly created one. When TYPE is `plain-text', CHILDREN must contain a single node - string. Alternatively, TYPE can be a string. When TYPE is nil or `anonymous', PROPS must be nil." - (cl-assert - ;; FIXME: Just use `plistp' from Emacs 29 when available. - (let ((len (proper-list-p props))) - (and len (cl-evenp len)))) + (cl-assert (if (fboundp 'plistp) ; Emacs 29.1 + (plistp props) + (let ((len (proper-list-p props))) + (and len (cl-evenp len))))) ;; Assign parray. (when (and props (not (stringp type)) (not (eq type 'plain-text))) (let ((node (list 'dummy props)))