* wl-thread.el (wl-thread-close-children): New function.
authoryoichi <yoichi>
Thu, 28 Sep 2006 14:33:14 +0000 (14:33 +0000)
committeryoichi <yoichi>
Thu, 28 Sep 2006 14:33:14 +0000 (14:33 +0000)
(wl-thread-open-children): Ditto.
* wl-action.el (wl-summary-set-mark): Redo the last change by
using it.

wl/ChangeLog
wl/wl-action.el
wl/wl-thread.el

index 84d1a50..5687f26 100644 (file)
@@ -1,5 +1,10 @@
 2006-09-28  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
+       * wl-thread.el (wl-thread-close-children): New function.
+       (wl-thread-open-children): Ditto.
+       * wl-action.el (wl-summary-set-mark): Redo the last change by
+       using it.
+
        * wl-action.el (wl-summary-set-mark): Undo the last change.
        Forbid interactive call.
 
index 685ae35..753a5d7 100644 (file)
@@ -100,6 +100,9 @@ Return number if put mark succeed"
                (wl-highlight-summary-current-line))
              (when data
                (wl-summary-print-argument number data)))
+           (when (and (eq wl-summary-buffer-view 'thread)
+                      interactive)
+             (wl-thread-open-children number))
            (set-buffer-modified-p nil)
            ;; Return value.
            number))
index 398c562..8ed56f1 100644 (file)
@@ -1004,6 +1004,16 @@ Message is inserted to the summary buffer."
     (delete-char 1) ; delete '\n'
     (wl-thread-print-argument-region beg (point))))
 
+(defun wl-thread-close-children (&optional number)
+  (interactive)
+  (when (eq wl-summary-buffer-view 'thread)
+    (setq number (or number (wl-summary-message-number)))
+    (save-excursion
+      (let ((inhibit-read-only t)
+           (entity (wl-thread-get-entity number)))
+       (when (wl-thread-entity-get-opened entity)
+         (wl-thread-close entity))))))
+
 (defun wl-thread-open (entity)
   (let (depth beg)
     (beginning-of-line)
@@ -1019,6 +1029,16 @@ Message is inserted to the summary buffer."
     (delete-char 1) ; delete '\n'
     (wl-thread-print-argument-region beg (point))))
 
+(defun wl-thread-open-children (&optional number)
+  (interactive)
+  (when (eq wl-summary-buffer-view 'thread)
+    (setq number (or number (wl-summary-message-number)))
+    (save-excursion
+      (let ((inhibit-read-only t)
+           (entity (wl-thread-get-entity number)))
+       (unless (wl-thread-entity-get-opened entity)
+         (wl-thread-open entity))))))
+
 (defun wl-thread-open-close (&optional force-open)
   (interactive "P")
   (when (eq wl-summary-buffer-view 'thread)