org-element: List interpretation doesn't depend on its structure
commitecba5542e6e7b8a2744a523232949acb2e0c521d
authorNicolas Goaziou <n.goaziou@gmail.com>
Thu, 2 Aug 2012 19:56:39 +0000 (2 21:56 +0200)
committerNicolas Goaziou <n.goaziou@gmail.com>
Thu, 2 Aug 2012 19:56:39 +0000 (2 21:56 +0200)
treeff759aa398f54aff6aef335455cda1993a289942
parenteb2eacf91dbb788e910e3190a681534718bd6304
org-element: List interpretation doesn't depend on its structure

* lisp/org-element.el (org-element-item-interpreter): Simplify bullet
  creation.
(org-element-plain-list-interpreter): Fix wrong bullets, if needed.

This change allows to intrepret plain lists without providing list's
structure, which can be a bit hairy.  For example, the following
snippet now suffices to create a list programmatically:

  (org-element-interpret-data
   '(plain-list nil
                (item (:bullet "-") (paragraph nil "a"))
                (item (:bullet "-") (paragraph nil "b"))))
lisp/org-element.el