From: yoichi Date: Thu, 28 Sep 2006 14:33:14 +0000 (+0000) Subject: * wl-thread.el (wl-thread-close-children): New function. X-Git-Tag: wl-2_15_5~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f4ebdc443b502d29c731c7c3ce48a6528a3e6db0;p=elisp%2Fwanderlust.git * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 84d1a50..5687f26 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,10 @@ 2006-09-28 Yoichi NAKAYAMA + * 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. diff --git a/wl/wl-action.el b/wl/wl-action.el index 685ae35..753a5d7 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -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)) diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 398c562..8ed56f1 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -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)