org-element: Tiny fix

* lisp/org-element.el (org-element--list-struct): Fix regexp.  Small
  refactoring.
This commit is contained in:
Nicolas Goaziou 2014-03-14 16:15:57 +01:00
parent d49957ef02
commit e3fa9355f3
1 changed files with 2 additions and 3 deletions

View File

@ -1284,10 +1284,9 @@ CONTENTS is the contents of the element."
(throw 'exit (sort struct 'car-less-than-car))))))
;; Skip blocks (any type) and drawers contents.
(cond
((and (looking-at "\\(?:[ \t]*\\)?#\\+BEGIN\\(:\\|_\\S-+\\)")
((and (looking-at "#\\+BEGIN\\(:\\|_\\S-+\\)")
(re-search-forward
(format "^[ \t]*#\\+END%s[ \t]*$"
(org-match-string-no-properties 1))
(format "^[ \t]*#\\+END%s[ \t]*$" (match-string 1))
limit t)))
((and (looking-at org-drawer-regexp)
(re-search-forward "^[ \t]*:END:[ \t]*$" limit t))))