浏览代码

org-macs: org-with-limited-levels also change org-outline-regexp-at-bol

* lisp/org-macs.el (org-with-limited-levels): also modify, when
  appropriate, `org-outline-regexp-at-bol'
Nicolas Goaziou 14 年之前
父节点
当前提交
71f654a182
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org-macs.el

+ 2 - 1
lisp/org-macs.el

@@ -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