mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 21:16:28 +00:00
org-element: Speed up parsing
* lisp/org-element.el (org-element-inline-babel-call-successor): Improve speed.
This commit is contained in:
parent
e3fa9355f3
commit
8012443bc8
|
@ -2880,8 +2880,12 @@ CONTENTS is nil."
|
|||
Return value is a cons cell whose CAR is `inline-babel-call' and
|
||||
CDR is beginning position."
|
||||
(save-excursion
|
||||
(when (re-search-forward org-babel-inline-lob-one-liner-regexp nil t)
|
||||
(cons 'inline-babel-call (match-end 1)))))
|
||||
(catch 'exit
|
||||
(while (search-forward "call_" nil t)
|
||||
(save-excursion
|
||||
(goto-char (match-beginning 0))
|
||||
(when (looking-at org-babel-inline-lob-one-liner-regexp)
|
||||
(throw 'exit (cons 'inline-babel-call (point)))))))))
|
||||
|
||||
|
||||
;;;; Inline Src Block
|
||||
|
|
Loading…
Reference in a new issue