diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-01-09 20:36:23 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-01-09 21:36:25 +0100 |
commit | 81ce406d8fccebf2449f6d45d0bf59abd747e70d (patch) | |
tree | 443173273bd330919a8d59d7802e87f691039ae4 | |
parent | 34af2fe7ff397a72ed65e85ec90665f1273164dc (diff) | |
download | org-mode-81ce406d8fccebf2449f6d45d0bf59abd747e70d.tar.gz |
ob-core: Speed improvement
* lisp/ob-core.el (org-babel-get-inline-src-block-matches): Do not
compute line number if all is needed is to know if we're on the
first one.
-rw-r--r-- | lisp/ob-core.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index f06cdaf..e8943c6 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -217,7 +217,7 @@ Returns non-nil if match-data set" (let ((src-at-0-p (save-excursion (beginning-of-line 1) (string= "src" (thing-at-point 'word)))) - (first-line-p (= 1 (line-number-at-pos))) + (first-line-p (= (line-beginning-position) (point-min))) (orig (point))) (let ((search-for (cond ((and src-at-0-p first-line-p "src_")) (first-line-p "[[:punct:] \t]src_") |