mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-22 07:48:35 +00:00
Fix problem with `org-ctrl-c-ctrl-c' on the checkbox of the first item.
* org.el (org-ctrl-c-ctrl-c): Don't make `C-c C-c' special when ticking the checkbox of the first item.
This commit is contained in:
parent
40976a7480
commit
7b512a1111
19
lisp/org.el
19
lisp/org.el
|
@ -18325,19 +18325,12 @@ This command does many different things, depending on context:
|
|||
block-item)
|
||||
;; Use a light version of `org-toggle-checkbox' to avoid
|
||||
;; computing list structure twice.
|
||||
(let ((new-box (cond
|
||||
((equal arg '(16)) "[-]")
|
||||
((equal arg '(4)) nil)
|
||||
((equal "[X]" cbox) "[ ]")
|
||||
(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)))
|
||||
(org-list-set-checkbox (point-at-bol) struct
|
||||
(cond
|
||||
((equal arg '(16)) "[-]")
|
||||
((equal arg '(4)) nil)
|
||||
((equal "[X]" cbox) "[ ]")
|
||||
(t "[X]")))
|
||||
;; Replicate `org-list-write-struct', while grabbing a return
|
||||
;; value from `org-list-struct-fix-box'.
|
||||
(org-list-struct-fix-ind struct parents 2)
|
||||
|
|
Loading…
Reference in a new issue