Address FIXME in org-element-create

* lisp/org/org-element-ast.el (org-element-create): Address FIXME.
This commit is contained in:
Stefan Kangas 2025-02-17 02:04:31 +01:00
parent 9efd11e5fd
commit b417c0abeb

View file

@ -731,10 +731,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)))