forked from mirrors/org-mode
babel: Fix bug in org-babel-get-inline-src-block-matches.
* lisp/ob-core.el (org-babel-get-inline-src-block-matches): Use `org-looking-at-p' instead of `thing-at-point'. The latter could give odd results depending on the syntax table. In particular, for me (thing-at-point 'word) was returning src_foo in this context.
This commit is contained in:
parent
f15b17688c
commit
d45b5a7884
|
@ -230,7 +230,7 @@ not match KEY should be returned."
|
||||||
Returns non-nil if match-data set"
|
Returns non-nil if match-data set"
|
||||||
(let ((src-at-0-p (save-excursion
|
(let ((src-at-0-p (save-excursion
|
||||||
(beginning-of-line 1)
|
(beginning-of-line 1)
|
||||||
(string= "src" (thing-at-point 'word))))
|
(org-looking-at-p "src")))
|
||||||
(first-line-p (= (line-beginning-position) (point-min)))
|
(first-line-p (= (line-beginning-position) (point-min)))
|
||||||
(orig (point)))
|
(orig (point)))
|
||||||
(let ((search-for (cond ((and src-at-0-p first-line-p "src_"))
|
(let ((search-for (cond ((and src-at-0-p first-line-p "src_"))
|
||||||
|
|
Loading…
Reference in a new issue