org-element: Speed optimizations
commitfb046f5b599968a99978fc6318da33f751e422be
authorNicolas Goaziou <n.goaziou@gmail.com>
Fri, 13 Jan 2012 16:01:45 +0000 (13 17:01 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Fri, 13 Jan 2012 16:56:56 +0000 (13 17:56 +0100)
treeb16968aeb9ad96f7a79d4f72cde97da0a71d1010
parent102adf13d49fa82ef029859cd7f1ecf499316143
org-element: Speed optimizations

* contrib/lisp/org-element.el (org-element--element-block-re): New
  variable.
(org-element-current-element): New function.
(org-element-parse-elements): Make use of the new specialized function
  instead of `org-element-at-point'.  Also narrow buffer to current
  container (greater element or recursive object) being parsed to
  improve search speed.
(org-element-comment-parser): Speed-up parsing for comments at column 0.
(org-element-guess-type): Make comment regexp less restrictive, due to
  comment optimizations.
contrib/lisp/org-element.el