org-element: Tiny fix
authorNicolas Goaziou <n.goaziou@gmail.com>
Fri, 14 Mar 2014 15:15:57 +0000 (16:15 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Fri, 14 Mar 2014 15:15:57 +0000 (16:15 +0100)
* lisp/org-element.el (org-element--list-struct): Fix regexp.  Small
  refactoring.

lisp/org-element.el

index 27e9bda..275b013 100644 (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))))