소스 검색

Fix insert-heading

* lisp/org.el (org-insert-heading): Fix problem with inserting
  heading.

The commit fixes a bug introduced in bb2022.
Carsten Dominik 12 년 전
부모
커밋
0fff0ba6da
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      lisp/org.el

+ 4 - 3
lisp/org.el

@@ -7509,9 +7509,10 @@ This is important for non-interactive uses of the command."
 	(and (not (org-in-item-p)) org-insert-heading-respect-content)
 	(not (org-insert-item
 	      (save-excursion
-		(org-beginning-of-item)
-		(looking-at org-list-full-item-re)
-		(match-string 3)))))
+		(and (org-in-item-p)
+		     (org-beginning-of-item)
+		     (looking-at org-list-full-item-re)
+		     (match-string 3))))))
     (let (begn endn)
       (when (org-buffer-narrowed-p)
 	(setq begn (point-min) endn (point-max))