X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-spam.el;h=ad1febc8b7ab5dc680ab399ec7d8d3655b0bae7f;hb=62345218eb5ad2b29ace6731bbddf1d3fe787c3c;hp=b33651a72be4c72f418c028dcb2878526b956bab;hpb=021fe26a59fa30d2cf46aa4982bf4264c57c0e52;p=elisp%2Fwanderlust.git diff --git a/wl/wl-spam.el b/wl/wl-spam.el index b33651a..ad1febc 100644 --- a/wl/wl-spam.el +++ b/wl/wl-spam.el @@ -263,6 +263,7 @@ See `wl-summary-mark-action-list' for the detail of element." (let ((domain (wl-spam-domain (elmo-folder-name-internal wl-summary-buffer-elmo-folder))) (total (length mark-list))) + (wl-folder-confirm-existence (elmo-make-folder wl-spam-folder)) (when (memq domain '(undecided good)) (message "Registering spam...") (elmo-with-progress-display (> total elmo-display-progress-threshold) @@ -292,17 +293,22 @@ See `wl-summary-mark-action-list' for the detail of element." (spam (setq spam-list nil)) (good (setq good-list nil))) (when (or spam-list good-list) - (message "Registering spam...") - (setq total (+ (length spam-list) (length good-list))) - (elmo-with-progress-display (> total elmo-display-progress-threshold) - (elmo-spam-register total "Registering spam...") - (when spam-list + (when spam-list + (setq total (length spam-list)) + (message "Registering spam...") + (elmo-with-progress-display (> total elmo-display-progress-threshold) + (elmo-spam-register total "Registering spam...") (elmo-spam-register-spam-messages processor folder spam-list (eq domain 'good))) - (when good-list + (message "Registering spam...done")) + (when good-list + (setq total (length good-list)) + (message "Registering good...") + (elmo-with-progress-display (> total elmo-display-progress-threshold) + (elmo-spam-register total "Registering good...") (elmo-spam-register-good-messages processor folder good-list - (eq domain 'spam)))) - (message "Registering spam...done"))) + (eq domain 'spam))) + (message "Registering good...done")))) ;; execute refile messages (wl-summary-exec-action-refile mark-list))) @@ -311,12 +317,11 @@ See `wl-summary-mark-action-list' for the detail of element." (number wl-message-buffer-cur-number) spam) (message "Cheking spam...") - (when (elmo-spam-buffer-spam-p (elmo-spam-processor) original) + (when (setq spam (elmo-spam-buffer-spam-p (elmo-spam-processor) original)) (with-current-buffer wl-message-buffer-cur-summary-buffer (wl-summary-spam number))) (message "Cheking spam...done") - (when (interactive-p) - (message "No: %d is %sa spam message." number (if spam "" "not "))))) + (message "No: %d is %sa spam message." number (if spam "" "not ")))) (defun wl-refile-guess-by-spam (entity) (when (elmo-spam-message-spam-p (elmo-spam-processor) @@ -347,6 +352,8 @@ See `wl-summary-mark-action-list' for the detail of element." wl-summary-skip-mark-list)))) (define-key wl-summary-mode-map "k" wl-summary-spam-map) (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) (define-key wl-summary-mode-map "mn" 'wl-summary-target-mark-register-as-good))