浏览代码

Merge branch 'maint'

Bastien Guerry 11 年之前
父节点
当前提交
c264904b12
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lisp/org.el

+ 4 - 1
lisp/org.el

@@ -7768,7 +7768,10 @@ command."
 	  ;; If we insert after content, move there and clean up whitespace
 	  (when (and respect-content
 		     (not (org-looking-at-p org-outline-regexp-bol)))
-	    (org-end-of-subtree nil t)
+	    (if (not (org-before-first-heading-p))
+		(org-end-of-subtree nil t)
+	      (re-search-forward org-outline-regexp-bol)
+	      (beginning-of-line 0))
 	    (skip-chars-backward " \r\n")
 	    (and (not (looking-back "^\\*+"))
 		 (looking-at "[ \t]+") (replace-match ""))