From 6d520b8343770e7f229cc09efbbe4ba0110444ad Mon Sep 17 00:00:00 2001 From: okazaki Date: Tue, 25 May 2010 05:25:58 +0000 Subject: [PATCH] * wl-spam.el (wl-summary-register-as-spam-region) (wl-thread-register-as-spam, wl-summary-register-as-good-region) (wl-thread-register-as-good): New functions. (wl-spam-setup): Bind "rks", "rkn", "tks" and "tkn". --- doc/wl-ja.texi | 24 ++++++++++++++++++++++++ doc/wl.texi | 22 ++++++++++++++++++++++ wl/ChangeLog | 7 +++++++ wl/wl-spam.el | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+) diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 0c140f4..5e0f1ad 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -7141,6 +7141,16 @@ spam かどうかのテストを行います。spam と判定されたメッセージには、sp 指定リージョンにあるメッセージをテストし、spam と判定された場合に spam マークを 付けます。spam でないと判定された場合は spam マークを取り除きます。 +@item r k s +@kindex r k s (Summary) +@findex wl-summary-register-as-spam-region +指定リージョンにあるメッセージを spam として登録します。 + +@item r k n +@kindex r k n (Summary) +@findex wl-summary-register-as-good-region +指定リージョンにあるメッセージを non-spam として登録します。 + @item t k m @kindex t k m (Summary) @findex wl-thread-spam @@ -7157,6 +7167,20 @@ spam でないと判定された場合は spam マークを取り除きます。 prefix argument つきならばカーソル行があるメッセージを含むスレッド全てに 適用します。 +@item t k s +@kindex t k s (Summary) +@findex wl-thread-register-as-spam +カーソル行があるメッセージを先頭とするスレッドのメッセージを spam として登録します。 +prefix argument つきならばカーソル行があるメッセージを含むスレッド全てに +適用します。 + +@item t k n +@kindex t k n (Summary) +@findex wl-thread-register-as-good +カーソル行があるメッセージを先頭とするスレッドのメッセージを non-spam として登録します。 +prefix argument つきならばカーソル行があるメッセージを含むスレッド全てに +適用します。 + @item m k @kindex m k (Summary) @findex wl-summary-target-mark-spam diff --git a/doc/wl.texi b/doc/wl.texi index f2517c2..7438ad8 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -7198,6 +7198,16 @@ Put spam mark on messages in the specified region. Test messages in the specified region and put spam mark if judged as spam. Remove spam mark if judged as non-spam. +@item r k s +@kindex r k s (Summary) +@findex wl-summary-register-as-spam-region +Register messages in the specified region as spam. + +@item r k n +@kindex r k n (Summary) +@findex wl-summary-register-as-good-region +Register messages in the specified region as non-spam. + @item t k m @kindex t k m (Summary) @findex wl-thread-spam @@ -7211,6 +7221,18 @@ Test messages which are the descendant of the current thread and put spam mark if judged as spam. Remove spam mark if judged as non-spam. With prefix argument, it affects on the all messages in the thread tree. +@item t k s +@kindex t k s (Summary) +@findex wl-thread-register-as-spam +Register messages which are the descendant of the current thread as spam. +With prefix argument, it affects on the all messages in the thread tree. + +@item t k n +@kindex t k n (Summary) +@findex wl-thread-register-as-good +Register messages which are the descendant of the current thread as non-spam. +With prefix argument, it affects on the all messages in the thread tree. + @item m k @kindex m k (Summary) @findex wl-summary-target-mark-spam diff --git a/wl/ChangeLog b/wl/ChangeLog index 9dea461..52c4610 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2010-05-25 Tetsurou Okazaki + + * wl-spam.el (wl-summary-register-as-spam-region) + (wl-thread-register-as-spam, wl-summary-register-as-good-region) + (wl-thread-register-as-good): New functions. + (wl-spam-setup): Bind "rks", "rkn", "tks" and "tkn". + 2010-04-28 Vitaly Mayatskikh * wl-e21.el (wl-e21-setup-toolbar): Don't define vector with images for the icon if there is only one image. diff --git a/wl/wl-spam.el b/wl/wl-spam.el index 2464ac4..8cb870f 100644 --- a/wl/wl-spam.el +++ b/wl/wl-spam.el @@ -272,6 +272,19 @@ See `wl-summary-mark-action-list' for the detail of element." (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder (list number))))) +(defun wl-summary-register-as-spam-region (beg end) + (interactive "r") + (let ((numbers (wl-summary-collect-numbers-region beg end))) + (cond (numbers + (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder + numbers)) + ((interactive-p) + (message "No message to register as spam."))))) + +(defun wl-thread-register-as-spam (&optional arg) + (interactive "P") + (wl-thread-call-region-func 'wl-summary-register-as-spam-region arg)) + (defun wl-summary-register-as-spam-all () (interactive) (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder @@ -296,6 +309,19 @@ See `wl-summary-mark-action-list' for the detail of element." (wl-spam-register-good-messages wl-summary-buffer-elmo-folder (list number))))) +(defun wl-summary-register-as-good-region (beg end) + (interactive "r") + (let ((numbers (wl-summary-collect-numbers-region beg end))) + (cond (numbers + (wl-spam-register-good-messages wl-summary-buffer-elmo-folder + numbers)) + ((interactive-p) + (message "No message to register as good."))))) + +(defun wl-thread-register-as-good (&optional arg) + (interactive "P") + (wl-thread-call-region-func 'wl-summary-register-as-good-region arg)) + (defun wl-summary-register-as-good-all () (interactive) (wl-spam-register-good-messages wl-summary-buffer-elmo-folder @@ -410,10 +436,18 @@ See `wl-summary-mark-action-list' for the detail of element." (define-key wl-summary-mode-map "rkc" 'wl-summary-test-spam-region) (define-key + wl-summary-mode-map "rks" 'wl-summary-register-as-spam-region) + (define-key + wl-summary-mode-map "rkn" 'wl-summary-register-as-good-region) + (define-key wl-summary-mode-map "tkm" 'wl-thread-spam) (define-key wl-summary-mode-map "tkc" 'wl-thread-test-spam) (define-key + wl-summary-mode-map "tks" 'wl-thread-register-as-spam) + (define-key + wl-summary-mode-map "tkn" 'wl-thread-register-as-good) + (define-key wl-summary-mode-map "mk" 'wl-summary-target-mark-spam) (define-key wl-summary-mode-map "ms" 'wl-summary-target-mark-register-as-spam) -- 1.7.10.4