From: okazaki Date: Wed, 8 Sep 2010 01:52:38 +0000 (+0000) Subject: Summary: Put spam mark on the message registered as spam and X-Git-Tag: merged-trunk-to-elmo-imap4-compliance-2^2~20 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b5692b53a7ba39752935617facefa772dc003477;p=elisp%2Fwanderlust.git Summary: Put spam mark on the message registered as spam and remove spam mark from the message registered as non-spam. * wl/wl-spam.el (wl-spam-register-spam-messages): Put spam mark on the registered messages unless specified folder is a spam folder. Add docstring. (wl-spam-register-good-messages): Remove spam mark from the registered messages. Add docstring. (wl-summary-register-as-spam) (wl-summary-register-as-spam-region, wl-thread-register-as-spam) (wl-summary-register-as-spam-all) (wl-summary-target-mark-register-as-spam) (wl-summary-register-as-good) (wl-summary-register-as-good-region, wl-thread-register-as-good) (wl-summary-register-as-good-all) (wl-summary-target-mark-register-as-good): Add docstring. --- diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 5e0f1ad..58d7a3b 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -7113,22 +7113,22 @@ spam かどうかのテストを行います。spam と判定されたメッセージには、sp @item k s @kindex k s (Summary) @findex wl-summary-register-as-spam -カーソル行のメッセージを spam として登録します。 +カーソル行のメッセージを spam として登録し spam マークを付けます。 @item k S @kindex k S (Summary) @findex wl-summary-register-as-spam-all -フォルダ内の全てのメッセージを spam として登録します。 +フォルダ内の全てのメッセージを spam として登録し spam マークを付けます。 @item k n @kindex k n (Summary) @findex wl-summary-register-as-good -カーソル行のメッセージを non-spam として登録します。 +カーソル行のメッセージを non-spam として登録し spam マークを取り除きます。 @item k N @kindex k N (Summary) @findex wl-summary-register-as-good-all -フォルダ内の全てのメッセージを non-spam として登録します。 +フォルダ内の全てのメッセージを non-spam として登録し spam マークを取り除きます。 @item r k m @kindex r k m (Summary) @@ -7144,12 +7144,12 @@ spam かどうかのテストを行います。spam と判定されたメッセージには、sp @item r k s @kindex r k s (Summary) @findex wl-summary-register-as-spam-region -指定リージョンにあるメッセージを spam として登録します。 +指定リージョンにあるメッセージを spam として登録し spam マークを付けます。 @item r k n @kindex r k n (Summary) @findex wl-summary-register-as-good-region -指定リージョンにあるメッセージを non-spam として登録します。 +指定リージョンにあるメッセージを non-spam として登録し spam マークを取り除きます。 @item t k m @kindex t k m (Summary) @@ -7170,14 +7170,16 @@ prefix argument つきならばカーソル行があるメッセージを含むスレッド全てに @item t k s @kindex t k s (Summary) @findex wl-thread-register-as-spam -カーソル行があるメッセージを先頭とするスレッドのメッセージを spam として登録します。 +カーソル行があるメッセージを先頭とするスレッドのメッセージを spam として登録し +spam マークを付けます。 prefix argument つきならばカーソル行があるメッセージを含むスレッド全てに 適用します。 @item t k n @kindex t k n (Summary) @findex wl-thread-register-as-good -カーソル行があるメッセージを先頭とするスレッドのメッセージを non-spam として登録します。 +カーソル行があるメッセージを先頭とするスレッドのメッセージを non-spam として登録し +spam マークを取り除きます。 prefix argument つきならばカーソル行があるメッセージを含むスレッド全てに 適用します。 @@ -7190,12 +7192,12 @@ prefix argument つきならばカーソル行があるメッセージを含むスレッド全てに @item m s @kindex m s (Summary) @findex wl-summary-target-mark-register-as-spam -まとめ処理用マーク @samp{*} のついたメッセージを spam として登録します。 +まとめ処理用マーク @samp{*} のついたメッセージを spam として登録し spam マークを付けます。 @item m n @kindex m n (Summary) @findex wl-summary-target-mark-register-as-good -まとめ処理用マーク @samp{*} のついたメッセージを non-spam として登録しま +まとめ処理用マーク @samp{*} のついたメッセージを non-spam として登録し spam マークを取り除きます。 す。 @end table diff --git a/doc/wl.texi b/doc/wl.texi index a7997f6..52b5baf 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -7170,22 +7170,22 @@ argument, test all messages regardless of their marks. @item k s @kindex k s (Summary) @findex wl-summary-register-as-spam -Register current message as spam. +Register current message as spam and put spam mark. @item k S @kindex k S (Summary) @findex wl-summary-register-as-spam-all -Register all messages in the folder as spam. +Register all messages in the folder as spam and put spam mark. @item k n @kindex k n (Summary) @findex wl-summary-register-as-good -Register current message as non-spam. +Register current message as non-spam and remove spam mark. @item k N @kindex k N (Summary) @findex wl-summary-register-as-good-all -Register all messages in the folder as non-spam. +Register all messages in the folder as non-spam and remove spam mark. @item r k m @kindex r k m (Summary) @@ -7201,12 +7201,12 @@ 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. +Register messages in the specified region as spam and put spam mark. @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. +Register messages in the specified region as non-spam and remove spam mark. @item t k m @kindex t k m (Summary) @@ -7224,13 +7224,15 @@ 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. +Register messages which are the descendant of the current thread as spam +and put spam mark. 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. +Register messages which are the descendant of the current thread as non-spam +and remove spam mark. With prefix argument, it affects on the all messages in the thread tree. @item m k @@ -7241,12 +7243,12 @@ Put spam mark (@samp{s}) on messages with the target mark @samp{*}. @item m s @kindex m s (Summary) @findex wl-summary-target-mark-register-as-spam -Register messages with the target mark @samp{*} as spam. +Register messages with the target mark @samp{*} as spam and put spam mark. @item m n @kindex m n (Summary) @findex wl-summary-target-mark-register-as-good -Register messages with the target mark @samp{*} as non-spam. +Register messages with the target mark @samp{*} as non-spam and remove spam mark. @end table @subsection Customizable Variables diff --git a/wl/ChangeLog b/wl/ChangeLog index d9703a4..c2580e9 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,19 @@ +2010-09-08 Tetsurou Okazaki + + * wl-spam.el (wl-spam-register-spam-messages): Put spam mark on + the registered messages unless specified folder is a spam folder. + Add docstring. + (wl-spam-register-good-messages): Remove spam mark from + the registered messages. Add docstring. + (wl-summary-register-as-spam) + (wl-summary-register-as-spam-region, wl-thread-register-as-spam) + (wl-summary-register-as-spam-all) + (wl-summary-target-mark-register-as-spam) + (wl-summary-register-as-good) + (wl-summary-register-as-good-region, wl-thread-register-as-good) + (wl-summary-register-as-good-all) + (wl-summary-target-mark-register-as-good): Add docstring. + 2010-08-31 TAKAHASHI Kaoru * wl-summary.el: Delete trailing whitespace. diff --git a/wl/wl-spam.el b/wl/wl-spam.el index 8cb870f..094852c 100644 --- a/wl/wl-spam.el +++ b/wl/wl-spam.el @@ -170,18 +170,28 @@ See `wl-summary-mark-action-list' for the detail of element." (funcall function folder (cdr partition) (car partition))))))) (defun wl-spam-register-spam-messages (folder numbers) + "Register messages specified by FOLDER and NUMBERS as spam. +Put spam mark unless FOLDER is a spam folder." (elmo-with-progress-display (elmo-spam-register (length numbers)) "Registering spam" (elmo-spam-register-spam-messages (elmo-spam-processor) folder - numbers))) + numbers)) + (unless (eq (wl-spam-domain (elmo-folder-name-internal folder)) + 'spam) + (dolist (number numbers) + (wl-summary-spam number)))) (defun wl-spam-register-good-messages (folder numbers) + "Register messages specified by FOLDER and NUMBERS as non-spam. +Remove spam mark." (elmo-with-progress-display (elmo-spam-register (length numbers)) "Registering good" (elmo-spam-register-good-messages (elmo-spam-processor) folder - numbers))) + numbers)) + (dolist (number numbers) + (wl-summary-unmark-spam number))) (defun wl-spam-save-status (&optional force) (interactive "P") @@ -266,6 +276,8 @@ See `wl-summary-mark-action-list' for the detail of element." (message "No message to test."))))) (defun wl-summary-register-as-spam () + "Register current message as spam. +Put spam mark unless current folder is a spam folder." (interactive) (let ((number (wl-summary-message-number))) (when number @@ -273,6 +285,8 @@ See `wl-summary-mark-action-list' for the detail of element." (list number))))) (defun wl-summary-register-as-spam-region (beg end) + "Register messages in the region between BEG and END as spam. +Put spam mark unless current folder is a spam folder." (interactive "r") (let ((numbers (wl-summary-collect-numbers-region beg end))) (cond (numbers @@ -282,15 +296,22 @@ See `wl-summary-mark-action-list' for the detail of element." (message "No message to register as spam."))))) (defun wl-thread-register-as-spam (&optional arg) + "Register messages which are the descendant of the current thread as spam. +Put spam mark unless current folder is a spam folder. +With prefix argument, it affects on the all messages in the thread tree." (interactive "P") (wl-thread-call-region-func 'wl-summary-register-as-spam-region arg)) (defun wl-summary-register-as-spam-all () + "Register all messages in the folder as spam. +Put spam mark unless current folder is a spam folder." (interactive) (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder wl-summary-buffer-number-list)) (defun wl-summary-target-mark-register-as-spam () + "Register messages with the target mark as spam. +Put spam mark unless current folder is a spam folder." (interactive) (save-excursion (goto-char (point-min)) @@ -303,6 +324,8 @@ See `wl-summary-mark-action-list' for the detail of element." (wl-summary-unset-mark number))))) (defun wl-summary-register-as-good () + "Register current message as non-spam. +Remove spam mark." (interactive) (let ((number (wl-summary-message-number))) (when number @@ -310,6 +333,8 @@ See `wl-summary-mark-action-list' for the detail of element." (list number))))) (defun wl-summary-register-as-good-region (beg end) + "Register messages in the region between BEG and END as non-spam. +Remove spam mark." (interactive "r") (let ((numbers (wl-summary-collect-numbers-region beg end))) (cond (numbers @@ -319,15 +344,22 @@ See `wl-summary-mark-action-list' for the detail of element." (message "No message to register as good."))))) (defun wl-thread-register-as-good (&optional arg) + "Register messages which are the descendant of the current thread as non-spam. +Remove spam mark. +With prefix argument, it affects on the all messages in the thread tree." (interactive "P") (wl-thread-call-region-func 'wl-summary-register-as-good-region arg)) (defun wl-summary-register-as-good-all () + "Register all messages in the folder as non-spam. +Remove spam mark." (interactive) (wl-spam-register-good-messages wl-summary-buffer-elmo-folder wl-summary-buffer-number-list)) (defun wl-summary-target-mark-register-as-good () + "Register messages with the target mark as non-spam. +Remove spam mark." (interactive) (save-excursion (goto-char (point-min))