diff options
author | Bastien Guerry <bzg@altern.org> | 2013-03-05 11:17:05 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-03-05 11:17:05 +0100 |
commit | 834db79fc5418c8bc535035fd020d488688a2dd2 (patch) | |
tree | 4d2a50efe6f5a7ee9802824572c647d6a778b752 | |
parent | b472884e5e7e9caf1ba70e8a09a67d92684650a8 (diff) | |
download | org-mode-834db79fc5418c8bc535035fd020d488688a2dd2.tar.gz |
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.
-rw-r--r-- | lisp/org.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index 781e3be..588821a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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 |