Revert "Fix problem with `org-ctrl-c-ctrl-c' on the checkbox of the first item."
This reverts commit 4789bb5a79
.
This commit is contained in:
parent
4fc96782dd
commit
4752725b64
13
lisp/org.el
13
lisp/org.el
|
@ -18390,12 +18390,19 @@ This command does many different things, depending on context:
|
||||||
block-item)
|
block-item)
|
||||||
;; Use a light version of `org-toggle-checkbox' to avoid
|
;; Use a light version of `org-toggle-checkbox' to avoid
|
||||||
;; computing list structure twice.
|
;; computing list structure twice.
|
||||||
(org-list-set-checkbox (point-at-bol) struct
|
(let ((new-box (cond
|
||||||
(cond
|
|
||||||
((equal arg '(16)) "[-]")
|
((equal arg '(16)) "[-]")
|
||||||
((equal arg '(4)) nil)
|
((equal arg '(4)) nil)
|
||||||
((equal "[X]" cbox) "[ ]")
|
((equal "[X]" cbox) "[ ]")
|
||||||
(t "[X]")))
|
(t "[X]"))))
|
||||||
|
(if firstp
|
||||||
|
;; If at first item of sub-list, remove check-box from
|
||||||
|
;; every item at the same level.
|
||||||
|
(mapc
|
||||||
|
(lambda (pos) (org-list-set-checkbox pos struct new-box))
|
||||||
|
(org-list-get-all-items
|
||||||
|
(point-at-bol) struct (org-list-prevs-alist struct)))
|
||||||
|
(org-list-set-checkbox (point-at-bol) struct new-box)))
|
||||||
;; Replicate `org-list-write-struct', while grabbing a return
|
;; Replicate `org-list-write-struct', while grabbing a return
|
||||||
;; value from `org-list-struct-fix-box'.
|
;; value from `org-list-struct-fix-box'.
|
||||||
(org-list-struct-fix-ind struct parents 2)
|
(org-list-struct-fix-ind struct parents 2)
|
||||||
|
|
Loading…
Reference in New Issue