* lisp/org-macs.el (org-with-limited-levels): also modify, when appropriate, `org-outline-regexp-at-bol'
@@ -347,7 +347,8 @@ point nowhere."
(defmacro org-with-limited-levels (&rest body)
"Execute BODY with limited number of outline levels."
- `(let* ((org-outline-regexp (org-get-limited-outline-regexp)))
+ `(let* ((org-outline-regexp (org-get-limited-outline-regexp))
+ (org-outline-regexp-at-bol (concat "^" org-outline-regexp)))
,@body))
(defvar org-outline-regexp) ; defined in org.el