Преглед на файлове

org-element: New variable defining complete list of objects

* contrib/lisp/org-element.el (org-element-all-objects): New variable.
Nicolas Goaziou преди 13 години
родител
ревизия
04a064d623
променени са 1 файла, в които са добавени 11 реда и са изтрити 3 реда
  1. 11 3
      contrib/lisp/org-element.el

+ 11 - 3
contrib/lisp/org-element.el

@@ -1517,8 +1517,9 @@ CONTENTS is nil."
 
 
 ;; Adding a new type of object is simple.  Implement a successor,
 ;; Adding a new type of object is simple.  Implement a successor,
 ;; a parser, and an interpreter for it, all following the naming
 ;; a parser, and an interpreter for it, all following the naming
-;; convention.  Register successor in `org-element-all-successors',
-;; maybe tweak restrictions about it, and that's it.
+;; convention.  Register type in `org-element-all-objects' and
+;; successor in `org-element-all-successors'.  Maybe tweak
+;; restrictions about it, and that's it.
 
 
 ;;;; Emphasis
 ;;;; Emphasis
 
 
@@ -2443,7 +2444,7 @@ CONTENTS is nil."
 		 babel-call paragraph plain-list property-drawer quote-block
 		 babel-call paragraph plain-list property-drawer quote-block
 		 quote-section section special-block src-block table
 		 quote-section section special-block src-block table
 		 verse-block)
 		 verse-block)
-  "Complete list of elements.")
+  "Complete list of element types.")
 
 
 (defconst org-element-greater-elements
 (defconst org-element-greater-elements
   '(center-block drawer dynamic-block footnote-definition headline inlinetask
   '(center-block drawer dynamic-block footnote-definition headline inlinetask
@@ -2466,6 +2467,13 @@ CONTENTS is nil."
 Sharing the same successor comes handy when, for example, the
 Sharing the same successor comes handy when, for example, the
 regexp matching one object can also match the other object.")
 regexp matching one object can also match the other object.")
 
 
+(defconst org-element-all-objects
+  '(emphasis entity export-snippet footnote-reference inline-babel-call
+	     inline-src-block line-break latex-fragment link macro radio-target
+	     statistics-cookie subscript superscript target time-stamp
+	     verbatim)
+  "Complete list of object types.")
+
 (defconst org-element-recursive-objects
 (defconst org-element-recursive-objects
   '(emphasis link macro subscript superscript target radio-target)
   '(emphasis link macro subscript superscript target radio-target)
   "List of recursive object types.")
   "List of recursive object types.")