Browse Source

org-element: Tiny speed-up for empty statistics cookies

* lisp/org-element.el (org-element--object-lex): Branch earlier for
empty statistics cookies.
Nicolas Goaziou 4 years ago
parent
commit
b3a59c858d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lisp/org-element.el

+ 3 - 0
lisp/org-element.el

@@ -4504,6 +4504,9 @@ to an appropriate container (e.g., a paragraph)."
 			 ((and ?f
 			       (guard (memq 'footnote-reference restriction)))
 			  (org-element-footnote-reference-parser))
+			 ((and (or ?% ?/)
+			       (guard (memq 'statistics-cookie restriction)))
+			  (org-element-statistics-cookie-parser))
 			 (_
 			  (or (and (memq 'timestamp restriction)
 				   (org-element-timestamp-parser))