branch: externals/org
commit 0e937ba36494d999063925d838f052cbd99adfdd
Author: Stefan Kangas <stefankan...@gmail.com>
Commit: Kyle Meyer <k...@kyleam.com>

    Backport commit b417c0abe from Emacs
    
    * lisp/org-element-ast.el (org-element-create): Address FIXME.
    
    Address FIXME in org-element-create
    b417c0abebfa68d37dd07160b81ce5f7da6dd431
    Stefan Kangas
    Mon Feb 17 02:22:28 2025 +0100
---
 lisp/org-element-ast.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el
index 2322bc69fc..60ecf34108 100644
--- a/lisp/org-element-ast.el
+++ b/lisp/org-element-ast.el
@@ -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)))

Reply via email to