summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-12-31 17:41:23 +0100
committerBastien Guerry <bzg@altern.org>2012-01-03 09:19:24 +0100
commit7b512a111146b83f96851226621ae9d97cec15be (patch)
tree208d9250d7831bd7d093f595111a8f4bae4a08d1
parent40976a748037adf5a05e8b8e4fcee138213f1521 (diff)
downloadorg-mode-7b512a111146b83f96851226621ae9d97cec15be.tar.gz
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.
-rw-r--r--lisp/org.el19
1 files changed, 6 insertions, 13 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 924d5fc..077fb19 100644
--- a/lisp/org.el
+++ b/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)