summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-05-04 16:57:26 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2009-05-04 16:57:26 +0200
commit34a91b7f5b41ebee2065d8151b33dc4d78e510e9 (patch)
treed22944b3b18bf6acd26e0f557074adaba060eafb
parent2207baf34c4dff385f950f3e2a765ef74d20322d (diff)
downloadorg-mode-34a91b7f5b41ebee2065d8151b33dc4d78e510e9.tar.gz
Moved `org-reset-checkbox-state-subtree' to org-list.el
-rw-r--r--contrib/lisp/org-checklist.el17
-rwxr-xr-xlisp/ChangeLog5
-rw-r--r--lisp/org-list.el15
3 files changed, 21 insertions, 16 deletions
diff --git a/contrib/lisp/org-checklist.el b/contrib/lisp/org-checklist.el
index c3348bc..26d228f 100644
--- a/contrib/lisp/org-checklist.el
+++ b/contrib/lisp/org-checklist.el
@@ -52,22 +52,7 @@
"Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set"
(interactive "*")
(if (org-entry-get (point) "RESET_CHECK_BOXES")
- (org-reset-checkbox-state)))
-
-(defun org-reset-checkbox-state ()
- "Reset all checkboxes in an entry"
- (interactive "*")
- (save-restriction
- (save-excursion
- (org-narrow-to-subtree)
- (org-show-subtree)
- (goto-char (point-min))
- (let ((end (point-max)))
- (while (< (point) end)
- (when (org-at-item-checkbox-p)
- (replace-match "[ ]" t t))
- (beginning-of-line 2))))
- (org-update-checkbox-count-maybe)))
+ (org-reset-checkbox-state-subtree)))
(defun org-make-checklist-export ()
"Produce a checklist containing all unchecked items from a list
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9091e67..14252fd 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2009-05-04 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-list.el (org-reset-checkbox-state-subtree): Moved here from
+ org-checklist.el.
+ (org-reset-checkbox-state-subtree): Call
+ `org-reset-checkbox-state-subtree'.
+
* org-remember.el (org-select-remember-template): For the
selection of a valid template.
diff --git a/lisp/org-list.el b/lisp/org-list.el
index d135ac0..453ae12 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -319,6 +319,21 @@ text below the heading."
(beginning-of-line 2)))))
(org-update-checkbox-count-maybe))
+(defun org-reset-checkbox-state-subtree ()
+ "Reset all checkboxes in an entry subtree."
+ (interactive "*")
+ (save-restriction
+ (save-excursion
+ (org-narrow-to-subtree)
+ (org-show-subtree)
+ (goto-char (point-min))
+ (let ((end (point-max)))
+ (while (< (point) end)
+ (when (org-at-item-checkbox-p)
+ (replace-match "[ ]" t t))
+ (beginning-of-line 2))))
+ (org-update-checkbox-count-maybe)))
+
(defun org-checkbox-blocked-p ()
"Is the current checkbox blocked from for being checked now?
A checkbox is blocked if all of the following conditions are fulfilled: