diff --git a/contrib/babel/lisp/org-babel.el b/contrib/babel/lisp/org-babel.el index 545ceace1..1ef10823e 100644 --- a/contrib/babel/lisp/org-babel.el +++ b/contrib/babel/lisp/org-babel.el @@ -1067,16 +1067,16 @@ relies on `org-babel-insert-result'." (let ((case-fold-search t)) (cond ((looking-at "[ \t]*#\\+begin_latex") - (search-forward "[ \t]*#\\+end_latex" nil t) + (re-search-forward "[ \t]*#\\+end_latex" nil t) (forward-line 1)) ((looking-at "[ \t]*#\\+begin_html") - (search-forward "[ \t]*#\\+end_html" nil t) + (re-search-forward "[ \t]*#\\+end_html" nil t) (forward-line 1)) ((looking-at "[ \t]*#\\+begin_example") - (search-forward "[ \t]*#\\+end_example" nil t) + (re-search-forward "[ \t]*#\\+end_example" nil t) (forward-line 1)) ((looking-at "[ \t]*#\\+begin_src") - (search-forward "[ \t]*#\\+end_src" nil t) + (re-search-forward "[ \t]*#\\+end_src" nil t) (forward-line 1)) (t (progn (while (looking-at "[ \t]*\\(: \\|\\[\\[\\)") (forward-line 1))))))