emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 81e85bda2b 088/101: Fix Emacs 27 compatibility


From: ELPA Syncer
Subject: [elpa] externals/org 81e85bda2b 088/101: Fix Emacs 27 compatibility
Date: Sat, 1 Jul 2023 09:59:16 -0400 (EDT)

branch: externals/org
commit 81e85bda2b16f30ac7a956ce84f3955e656d54f9
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    Fix Emacs 27 compatibility
    
    * lisp/org-element-ast.el (org-element-create): Do not use `length='
    that is not yet available.
    (org-element-property-inherited): Do not use `ensure-list' that is not
    yet available.
---
 lisp/org-element-ast.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el
index 2763bf1a7b..c92d82391b 100644
--- a/lisp/org-element-ast.el
+++ b/lisp/org-element-ast.el
@@ -757,7 +757,7 @@ string.  Alternatively, TYPE can be a string.  When TYPE is 
nil or
      (cl-assert (null props))
      (apply #'org-element-adopt nil children))
     (`plain-text
-     (cl-assert (length= children 1))
+     (cl-assert (= (length children) 1))
      (org-add-props (car children) props))
     ((pred stringp)
      (if props (org-add-props type props) type))
@@ -1015,7 +1015,7 @@ When LITERAL-NIL is non-nil, treat property values 
\"nil\" and nil.
 When INCLUDE-NIL is non-nil, do not skip properties with value nil.  The
 properties that are missing from the property list will still be
 skipped."
-  (setq property (ensure-list property))
+  (unless (listp property) (setq property (list property)))
   (let (acc local val)
     (catch :found
       (unless with-self (setq node (org-element-parent node)))
@@ -1030,7 +1030,7 @@ skipped."
             ;; Append to the end.
             (if (and include-nil (not val))
                 (setq local (append local '(nil)))
-              (setq local (append local (ensure-list val))))))
+              (setq local (append local (if (listp val) val (list val)))))))
         ;; Append parent to front.
         (setq acc (append local acc))
         (setq node (org-element-parent node)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]