From e0d9acdb28895c0b8190cf2a14b344ded6f1105d Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 7 Jan 2004 11:38:17 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-buffer-prev-copy-destination): Abolish. (wl-summary-mode-map): Bound "t\M-o", "m\M-o" and "r\M-o" * wl-action.el (wl-summary-refile-prev-destination): Rewrite. (wl-summary-refile-prev-destination-region): New function. (wl-thread-refile-prev-destination): Ditto. (wl-summary-target-mark-refile-prev-destination): Ditto. --- wl/ChangeLog | 10 ++++++++++ wl/wl-action.el | 44 ++++++++++++++++++++++++++++++++++++++++---- wl/wl-summary.el | 4 +++- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index aa8a5f6..88e9e8f 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2004-01-07 Yuuichi Teranishi + + * wl-summary.el (wl-summary-buffer-prev-copy-destination): Abolish. + (wl-summary-mode-map): Bound "t\M-o", "m\M-o" and "r\M-o" + + * wl-action.el (wl-summary-refile-prev-destination): Rewrite. + (wl-summary-refile-prev-destination-region): New function. + (wl-thread-refile-prev-destination): Ditto. + (wl-summary-target-mark-refile-prev-destination): Ditto. + 2004-01-05 Yuuichi Teranishi * wl-vars.el (wl-demo-image-filter-alist): Set default value to nil. diff --git a/wl/wl-action.el b/wl/wl-action.el index 3dd4532..fe0a28d 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -479,7 +479,7 @@ Return number if put mark succeed" ;; update buffer. (wl-summary-delete-messages-on-buffer (cdr (car dst-msgs))) (setq wl-summary-buffer-temp-mark-list - (wl-delete-associations + (wl-delete-associations (cdr (car dst-msgs)) wl-summary-buffer-temp-mark-list))) (setq failures @@ -778,15 +778,51 @@ Return number if put mark succeed" "Return t if temporal MARK should be reserved." (member mark wl-summary-reserve-mark-list)) +;; Refile prev destination (defun wl-summary-refile-prev-destination () "Refile message to previously refiled destination." (interactive) - (funcall (symbol-function 'wl-summary-refile) - wl-summary-buffer-prev-refile-destination) - (if (eq wl-summary-move-direction-downward nil) + (wl-summary-refile (wl-summary-message-number) + wl-summary-buffer-prev-refile-destination) + (if (and (interactive-p) + (eq wl-summary-move-direction-downward nil)) (wl-summary-prev) (wl-summary-next))) +(defun wl-summary-refile-prev-destination-region (beg end) + "Refile messages in the region to previously refiled destination." + (interactive "r") + (wl-summary-mark-region-subr 'wl-summary-refile + beg end + wl-summary-buffer-prev-refile-destination)) + +(defun wl-thread-refile-prev-destination (arg) + "Refile messages in the thread to previously refiled destination." + (interactive "P") + (wl-thread-call-region-func + 'wl-summary-refile-prev-destination-region + arg)) + +(defun wl-summary-target-mark-refile-prev-destination () + "Refile messages with target mark to previously refiled destination." + (interactive) + (let ((elem wl-summary-mark-action-list) + action) + (while elem + (when (eq (wl-summary-action-symbol (car elem)) 'refile) + (setq action (car elem)) + (setq elem nil)) + (setq elem (cdr elem))) + (wl-summary-target-mark-set-action + (list + (car action) + 'refile-prev-destination + (lambda (&rest args) wl-summary-buffer-prev-refile-destination) + (nth 2 action) + (nth 3 action) + (nth 4 action) + (nth 6 action))))) + (defsubst wl-summary-no-auto-refile-message-p (number) (member (wl-summary-message-mark wl-summary-buffer-elmo-folder number) wl-summary-auto-refile-skip-marks)) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index b0bc289..e2ab55f 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -96,7 +96,6 @@ (defvar wl-summary-buffer-thread-nodes nil) (defvar wl-summary-buffer-target-mark-list nil) (defvar wl-summary-buffer-prev-refile-destination nil) -(defvar wl-summary-buffer-prev-copy-destination nil) (defvar wl-summary-buffer-saved-message nil) (defvar wl-summary-buffer-prev-folder-function nil) (defvar wl-summary-buffer-next-folder-function nil) @@ -481,6 +480,7 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map "t*" 'wl-thread-target-mark) (define-key wl-summary-mode-map "to" 'wl-thread-refile) (define-key wl-summary-mode-map "tO" 'wl-thread-copy) + (define-key wl-summary-mode-map "t\M-o" 'wl-thread-refile-prev-destination) (define-key wl-summary-mode-map "td" 'wl-thread-dispose) (define-key wl-summary-mode-map "tD" 'wl-thread-delete) (define-key wl-summary-mode-map "t~" 'wl-thread-resend) @@ -496,6 +496,7 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map "mi" 'wl-summary-target-mark-prefetch) (define-key wl-summary-mode-map "mo" 'wl-summary-target-mark-refile) (define-key wl-summary-mode-map "mO" 'wl-summary-target-mark-copy) + (define-key wl-summary-mode-map "m\M-o" 'wl-summary-target-mark-refile-prev-destination) (define-key wl-summary-mode-map "md" 'wl-summary-target-mark-dispose) (define-key wl-summary-mode-map "mD" 'wl-summary-target-mark-delete) (define-key wl-summary-mode-map "m~" 'wl-summary-target-mark-resend) @@ -524,6 +525,7 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map "r*" 'wl-summary-target-mark-region) (define-key wl-summary-mode-map "ro" 'wl-summary-refile-region) (define-key wl-summary-mode-map "rO" 'wl-summary-copy-region) + (define-key wl-summary-mode-map "r\M-o" 'wl-summary-refile-prev-destination-region) (define-key wl-summary-mode-map "rd" 'wl-summary-dispose-region) (define-key wl-summary-mode-map "rD" 'wl-summary-delete-region) (define-key wl-summary-mode-map "r~" 'wl-summary-resend-region) -- 1.7.10.4