From 04a064d623b15f678de60e0cf8aca58b552e1796 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 22 Feb 2012 21:06:04 +0100 Subject: [PATCH] org-element: New variable defining complete list of objects * contrib/lisp/org-element.el (org-element-all-objects): New variable. --- contrib/lisp/org-element.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/org-element.el b/contrib/lisp/org-element.el index 40e9e405b..c7e33b06d 100644 --- a/contrib/lisp/org-element.el +++ b/contrib/lisp/org-element.el @@ -1517,8 +1517,9 @@ CONTENTS is nil." ;; Adding a new type of object is simple. Implement a successor, ;; 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 @@ -2443,7 +2444,7 @@ CONTENTS is nil." babel-call paragraph plain-list property-drawer quote-block quote-section section special-block src-block table verse-block) - "Complete list of elements.") + "Complete list of element types.") (defconst org-element-greater-elements '(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 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 '(emphasis link macro subscript superscript target radio-target) "List of recursive object types.")