Browse Source

Moved `org-reset-checkbox-state-subtree' to org-list.el

Carsten Dominik 12 years ago
parent
commit
34a91b7f5b
3 changed files with 21 additions and 16 deletions
  1. 1 16
      contrib/lisp/org-checklist.el
  2. 5 0
      lisp/ChangeLog
  3. 15 0
      lisp/org-list.el

+ 1 - 16
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

+ 5 - 0
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.
 

+ 15 - 0
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: