classified as spam.
(wl-summary-test-spam-messages): New function.
(wl-summary-test-spam-region): Use `wl-summary-test-spam-messages' instead of
`wl-spam-map-spam-messages'.
@kindex k c (Summary)
@findex wl-summary-test-spam
\e$B%+!<%=%k9T$N%a%C%;!<%8$r%F%9%H$7!"\e(Bspam \e$B$HH=Dj$5$l$?>l9g$K\e(B spam \e$B%^!<%/$r\e(B
-\e$BIU$1$^$9!#\e(B
+\e$BIU$1$^$9!#\e(Bspam \e$B$G$J$$$HH=Dj$5$l$?>l9g$O\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
@item k C
@kindex k C (Summary)
@kindex r k c (Summary)
@findex wl-summary-test-spam-region
\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$r%F%9%H$7!"\e(Bspam \e$B$HH=Dj$5$l$?>l9g$K\e(B spam \e$B%^!<%/$r\e(B
-\e$BIU$1$^$9!#\e(B
+\e$BIU$1$^$9!#\e(Bspam \e$B$G$J$$$HH=Dj$5$l$?>l9g$O\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
@item t k m
@kindex t k m (Summary)
@findex wl-thread-test-spam
\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$N%a%C%;!<%8$r%F%9%H$7!"\e(B
spam \e$B$HH=Dj$5$l$?>l9g$K\e(B spam \e$B%^!<%/$rIU$1$^$9!#\e(B
+spam \e$B$G$J$$$HH=Dj$5$l$?>l9g$O\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K\e(B
\e$BE,MQ$7$^$9!#\e(B
@kindex k c (Summary)
@findex wl-summary-test-spam
Test current message and put spam mark if judged as spam.
+Remove spam mark if judged as non-spam.
@item k C
@kindex k C (Summary)
@kindex r k c (Summary)
@findex wl-summary-test-spam-region
Test messages in the specified region and put spam mark if judged as spam.
+Remove spam mark if judged as non-spam.
@item t k m
@kindex t k m (Summary)
@kindex t k c (Summary)
@findex wl-thread-test-spam
Test messages which are the descendant of the current thread and put spam mark
-if judged as spam. With prefix argument, it affects on the all messages in
-the thread tree.
+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 m k
@kindex m k (Summary)
+2010-02-16 Tetsurou Okazaki <okazaki@be.to>
+
+ * wl-spam.el (wl-summary-test-spam): Call `wl-summary-unmark-spam'
+ for the message not classified as spam.
+ (wl-summary-test-spam-messages): New function.
+ (wl-summary-test-spam-region): Use `wl-summary-test-spam-messages'
+ instead of `wl-spam-map-spam-messages'.
+
2010-02-08 Tetsurou Okazaki <okazaki@be.to>
* wl-action.el (wl-summary-action-unmark-docstring): New inline function.
(eval-when-compile
;; Avoid compile warnings
- (defalias-maybe 'wl-summary-spam 'ignore))
+ (defalias-maybe 'wl-summary-spam 'ignore)
+ (defalias-maybe 'wl-summary-unmark-spam 'ignore))
(defun wl-summary-test-spam (&optional folder number)
(interactive)
(number (or number (wl-summary-message-number)))
spam)
(message "Checking spam...")
- (when (setq spam (elmo-spam-message-spam-p (elmo-spam-processor)
- folder number))
- (wl-summary-spam number))
+ (if (setq spam (elmo-spam-message-spam-p (elmo-spam-processor)
+ folder number))
+ (wl-summary-spam number)
+ (wl-summary-unmark-spam number))
(message "Checking spam...done")
(when (interactive-p)
(message "No: %d is %sa spam message." number (if spam "" "not ")))))
+(defun wl-summary-test-spam-messages (folder numbers &rest args)
+ (elmo-with-progress-display (elmo-spam-check-spam (length numbers))
+ "Checking spam"
+ (let* ((spams (elmo-spam-list-spam-messages (elmo-spam-processor)
+ folder
+ numbers))
+ (goods (car (elmo-list-diff numbers spams))))
+ (dolist (number spams)
+ (wl-summary-spam number args))
+ (dolist (number goods)
+ (wl-summary-unmark-spam number)))))
+
(defun wl-summary-test-spam-region (beg end)
(interactive "r")
(let ((numbers (wl-summary-collect-numbers-region beg end)))
(cond (numbers
- (wl-spam-map-spam-messages wl-summary-buffer-elmo-folder
- numbers
- #'wl-summary-spam))
+ (wl-summary-test-spam-messages wl-summary-buffer-elmo-folder
+ numbers))
((interactive-p)
(message "No message to test.")))))