Browse Source

org-insert-heading-respect-content: Fix test failures after a1af06d64

* lisp/org.el (org-insert-todo-heading-respect-content): Ignore the
optional argument always inserting a heading.
Ihor Radchenko 2 năm trước cách đây
mục cha
commit
b4e41b9879
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -6401,10 +6401,11 @@ Set it to HEADING when provided."
   (interactive)
   (org-insert-heading '(4) invisible-ok))
 
-(defun org-insert-todo-heading-respect-content (&optional force-state)
+(defun org-insert-todo-heading-respect-content (&optional _)
   "Insert TODO heading with `org-insert-heading-respect-content' set to t."
   (interactive)
-  (org-insert-todo-heading '(4) force-state))
+  (let ((org-insert-heading-respect-content t))
+    (org-insert-todo-heading '(4) t)))
 
 (defun org-insert-todo-heading (arg &optional force-heading)
   "Insert a new heading with the same level and TODO state as current heading.