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

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

[elpa] externals/org afc529b4a0 2/2: lisp/org-element-ast.el (org-elemen


From: ELPA Syncer
Subject: [elpa] externals/org afc529b4a0 2/2: lisp/org-element-ast.el (org-element-type-p): Simplify implementation
Date: Tue, 30 Jan 2024 12:58:54 -0500 (EST)

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

    lisp/org-element-ast.el (org-element-type-p): Simplify implementation
    
    Reported-by: Stefan Monnier <monnier@iro.umontreal.ca>
    Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68818#11
---
 lisp/org-element-ast.el | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el
index 24f0ac62e8..92a2935ad6 100644
--- a/lisp/org-element-ast.el
+++ b/lisp/org-element-ast.el
@@ -230,16 +230,11 @@ when NODE is an anonymous node."
 
 (define-inline org-element-type-p (node types)
   "Return non-nil when NODE type is one of TYPES.
-TYPES can be a type symbol or a list of symbols."
-  (if (inline-const-p types)
-      (if (listp (inline-const-val types))
-          (inline-quote (memq (org-element-type ,node t) ,types))
-        (inline-quote (eq (org-element-type ,node t) ,types)))
-    (inline-letevals (node types)
-      (inline-quote
-       (if (listp ,types)
-           (memq (org-element-type ,node t) ,types)
-         (eq (org-element-type ,node t) ,types))))))
+      TYPES can be a type symbol or a list of symbols."
+  (inline-letevals (node types)
+    (if (listp (inline-const-val types))
+       (inline-quote (memq (org-element-type ,node t) ,types))
+      (inline-quote (eq (org-element-type ,node t) ,types)))))
 
 (defun org-element-secondary-p (node)
   "Non-nil when NODE directly belongs to a secondary node.



reply via email to

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