(spam-mark-junk-as-spam-routine)
authorTeodor Zlatanov <tzz@lifelogs.com>
Wed, 26 May 2004 16:30:50 +0000 (16:30 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Wed, 26 May 2004 16:30:50 +0000 (16:30 +0000)
(spam-mark-new-messages-in-spam-group-as-spam): allow user to
disable assigning the spam-mark to new messages

lisp/ChangeLog
lisp/spam.el

index aba9850..8447728 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-26  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * spam.el (spam-mark-junk-as-spam-routine)
+       (spam-mark-new-messages-in-spam-group-as-spam): allow user to
+       disable assigning the spam-mark to new messages
+
 2004-05-26  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * dgnushack.el: Autoload customize-set-variable for XEmacs.
index 4d4c9f0..152a9f3 100644 (file)
@@ -87,6 +87,11 @@ spam groups."
   :type 'boolean
   :group 'spam)
 
+(defcustom spam-mark-new-messages-in-spam-group-as-spam t
+  "Whether new messages in a spam group should get the spam-mark."
+  :type 'boolean
+  :group 'spam)
+
 (defcustom spam-process-ham-in-nonham-groups nil
   "Whether ham should be processed in non-ham groups."
   :type 'boolean
@@ -970,8 +975,10 @@ When either list is nil, the other is returned."
     (let ((articles (if spam-mark-only-unseen-as-spam
                        gnus-newsgroup-unseen
                      gnus-newsgroup-unreads)))
-      (dolist (article articles)
-       (gnus-summary-mark-article article gnus-spam-mark)))))
+      (if spam-mark-new-messages-in-spam-group-as-spam
+         (dolist (article articles)
+           (gnus-summary-mark-article article gnus-spam-mark))
+       (gnus-message 9 "Did not mark new messages as spam.")))))
 
 (defun spam-mark-spam-as-expired-and-move-routine (&rest groups)
   (if (and (car-safe groups) (listp (car-safe groups)))