* elmo-spam.el (elmo-spam-scheme): Add 'sa' as a candidate.
[elisp/wanderlust.git] / wl / wl-spam.el
index 1a7fee4..255aeda 100644 (file)
@@ -41,7 +41,7 @@
   "Spam configuration for wanderlust."
   :group 'wl)
 
-(defcustom wl-spam-folder-name "+spam"
+(defcustom wl-spam-folder "+spam"
   "*Spam folder."
   :type 'string
   :group 'wl-spam)
@@ -103,7 +103,7 @@ See `wl-summary-mark-action-list' for the detail of element."
   :group 'wl-spam)
 
 (defun wl-spam-domain (folder-name)
-  (cond ((string= folder-name wl-spam-folder-name)
+  (cond ((string= folder-name wl-spam-folder)
         'spam)
        ((wl-string-match-member folder-name
                                 wl-spam-undecided-folder-regexp-list)
@@ -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)
@@ -273,7 +274,7 @@ See `wl-summary-mark-action-list' for the detail of element."
                                          (eq domain 'good)))
       (message "Registering spam...done"))
     (wl-summary-move-mark-list-messages mark-list
-                                       wl-spam-folder-name
+                                       wl-spam-folder
                                        "Refiling spam...")))
 
 (defun wl-summary-exec-action-refile-with-register (mark-list)
@@ -322,7 +323,7 @@ See `wl-summary-mark-action-list' for the detail of element."
   (when (elmo-spam-message-spam-p (elmo-spam-processor)
                                  wl-summary-buffer-elmo-folder
                                  (elmo-message-entity-number entity))
-    wl-spam-folder-name))
+    wl-spam-folder))
 
 (defun wl-spam-setup ()
   (add-hook 'wl-summary-prepared-hook #'wl-summary-auto-check-spam)
@@ -347,6 +348,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))