(gnus-article-decode-hook): Add IDNA.
[gnus] / lisp / spam.el
index 451f64f..e95baf5 100644 (file)
@@ -40,6 +40,9 @@
 (require 'gnus)        ; for the definitions of group content classification and spam processors
 (require 'message)                     ;for the message-fetch-field functions
 
+;; for nnimap-split-download-body-default
+(eval-when-compile (require 'nnimap))
+
 ;; autoload executable-find
 (eval-and-compile
   ;; executable-find is not autoloaded in Emacs 20
@@ -69,7 +72,15 @@ When nil, only ham and unclassified groups will have their spam moved
 to the spam-process-destination.  When t, spam will also be moved from
 spam groups."
   :type 'boolean
-  :group 'spam-ifile)
+  :group 'spam)
+
+(defcustom spam-mark-ham-unread-before-move-from-spam-group nil
+  "Whether ham should be marked unread before it's moved out of a spam
+group according to ham-process-destination.  This variable is an
+official entry in the international Longest Variable Name
+Competition."
+  :type 'boolean
+  :group 'spam)
 
 (defcustom spam-whitelist (expand-file-name "whitelist" spam-directory)
   "The location of the whitelist.
@@ -470,6 +481,8 @@ your main source of newsgroup names."
       ;; now do the actual move
       (when tomove
        (dolist (article tomove)
+         (when spam-mark-ham-unread-before-move-from-spam-group
+           (gnus-summary-mark-article article gnus-unread-mark))           
          (gnus-summary-set-process-mark article))
        (if copy
            (gnus-summary-copy-article nil group)
@@ -612,8 +625,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
 (defun spam-setup-widening ()
   (dolist (check spam-list-of-statistical-checks)
     (when (symbol-value check)
-      (setq nnimap-split-download-body t)
-      (return))))
+      (setq nnimap-split-download-body-default t))))
 
 (add-hook 'gnus-get-new-news-hook 'spam-setup-widening)