org.el (org-insert-heading): If the current item has a checkbox, insert the new item with a checkbox

* org.el (org-insert-heading): If the current item has a
checkbox, insert the new item with a checkbox.
This commit is contained in:
Bastien Guerry 2013-03-05 11:17:05 +01:00
parent b472884e5e
commit 834db79fc5
1 changed files with 6 additions and 1 deletions

View File

@ -7380,7 +7380,12 @@ This is important for non-interactive uses of the command."
(if (org-previous-line-empty-p) "" "\n")
(if (org-in-src-block-p) ",* " "* "))
(run-hooks 'org-insert-heading-hook))
(when (or arg (not (org-insert-item)))
(when (or arg
(not (org-insert-item
(save-excursion
(beginning-of-line)
(looking-at org-list-full-item-re)
(match-string 3)))))
(let* ((empty-line-p nil)
(eops (equal arg '(16))) ; insert at end of parent subtree
(org-insert-heading-respect-content