diff --git a/lisp/ob.el b/lisp/ob.el index 5f3e4b8d5..a3a806f17 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -1100,8 +1100,11 @@ If the point is not on a source block then return nil." (or (save-excursion ;; on a source name line (beginning-of-line 1) - (and (looking-at org-babel-src-name-regexp) (forward-line 1) - (looking-at org-babel-src-block-regexp) + (and (looking-at org-babel-src-name-regexp) + (progn + (while (and (forward-line 1) + (looking-at org-babel-multi-line-header-regexp))) + (looking-at org-babel-src-block-regexp)) (point))) (save-excursion ;; on a #+begin_src line (beginning-of-line 1)