diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-06-09 14:38:20 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-06-09 14:42:07 +0200 |
commit | e5b5656aa23c8be3d28aed57c459c6a2fdfd20e4 (patch) | |
tree | bef29ac4ecf69d96d18bb66e528e21098dcb947d | |
parent | c88599424c699b2b6d7441c65d3cd8083de6ee77 (diff) | |
download | org-mode-e5b5656aa23c8be3d28aed57c459c6a2fdfd20e4.tar.gz |
org-list: Allow check-boxes in description lists
* lisp/org-list.el (org-list-automatic-rules): Allow check-boxes in
description lists.
(org-list-struct-apply-struct, org-insert-item): Remove rule check.
-rw-r--r-- | lisp/org-list.el | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el index dd05094..648497f 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -252,8 +252,6 @@ bullet when non-nil, cycling bullet do not allow lists at to be numbered. checkbox when non-nil, checkbox statistics is updated each time you either insert a new checkbox or toggle a checkbox. - It also prevents from inserting a checkbox in a - description item. indent when non-nil, indenting or outdenting list top-item with its subtree will move the whole list and outdenting a list whose bullet is * to column 0 will @@ -1842,7 +1840,6 @@ Initial position of cursor is restored after the changes." (inlinetask-re (and (featurep 'org-inlinetask) (org-inlinetask-outline-regexp))) (item-re (org-item-re)) - (box-rule-p (cdr (assq 'checkbox org-list-automatic-rules))) (shift-body-ind (function ;; Shift the indentation between END and BEG by DELTA. @@ -1881,9 +1878,6 @@ Initial position of cursor is restored after the changes." (replace-match new-bul nil nil nil 1)) ;; b. Replace checkbox. (cond - ((and new-box box-rule-p - (save-match-data (org-at-item-description-p))) - (message "Cannot add a checkbox to a description list item")) ((equal (match-string 3) new-box)) ((and (match-string 3) new-box) (replace-match new-box nil nil nil 3)) @@ -2199,17 +2193,11 @@ item is invisible." (prevs (org-list-prevs-alist struct)) ;; If we're in a description list, ask for the new term. (desc (when (org-list-get-tag itemp struct) - (concat (read-string "Term: ") " :: "))) - ;; Don't insert a checkbox if checkbox rule is applied - ;; and it is a description item. - (checkp (and checkbox - (or (not desc) - (not (cdr (assq 'checkbox - org-list-automatic-rules))))))) + (concat (read-string "Term: ") " :: ")))) (setq struct - (org-list-insert-item pos struct prevs checkp desc)) + (org-list-insert-item pos struct prevs checkbox desc)) (org-list-write-struct struct (org-list-parents-alist struct)) - (when checkp (org-update-checkbox-count-maybe)) + (when checkbox (org-update-checkbox-count-maybe)) (looking-at org-list-full-item-re) (goto-char (match-end 0)) t))))) |