ob.el: Find a src block head correctly when #+header(s) is before #+name

* ob.el (org-babel-where-is-src-block-head): Find a src block
head correctly when #+header(s) is before #+name.
This commit is contained in:
Bastien Guerry 2012-08-30 08:45:50 +02:00
parent 96cef218f0
commit 4b3f64fdcc
1 changed files with 2 additions and 1 deletions

View File

@ -1494,7 +1494,8 @@ If the point is not on a source block then return nil."
(looking-at org-babel-multi-line-header-regexp))
(progn
(while (and (forward-line 1)
(looking-at org-babel-multi-line-header-regexp)))
(or (looking-at org-babel-src-name-regexp)
(looking-at org-babel-multi-line-header-regexp))))
(looking-at org-babel-src-block-regexp))
(point)))
(save-excursion ;; on a #+begin_src line