Synch to No Gnus 200402092051.
[elisp/gnus.git-] / lisp / spam.el
index 451a340..2dec99b 100644 (file)
@@ -73,7 +73,7 @@
 (defgroup spam nil
   "Spam configuration.")
 
-(defcustom spam-directory "~/News/spam/"
+(defcustom spam-directory (nnheader-concat gnus-directory "spam/")
   "Directory for spam whitelists and blacklists."
   :type 'directory
   :group 'spam)
@@ -585,14 +585,14 @@ finds ham or spam.")
     (gnus-group-spam-exit-processor-ifile        spam spam-use-ifile)
     (gnus-group-spam-exit-processor-stat         spam spam-use-stat)
     (gnus-group-spam-exit-processor-spamoracle   spam spam-use-spamoracle)
-    (gnus-group-spam-exit-processor-spamassassin spam spam-use-spam-spamassassin)
+    (gnus-group-spam-exit-processor-spamassassin spam spam-use-spamassassin)
     (gnus-group-ham-exit-processor-ifile         ham spam-use-ifile)
     (gnus-group-ham-exit-processor-bogofilter    ham spam-use-bogofilter)
     (gnus-group-ham-exit-processor-stat          ham spam-use-stat)
     (gnus-group-ham-exit-processor-whitelist     ham spam-use-whitelist)
     (gnus-group-ham-exit-processor-BBDB          ham spam-use-BBDB)
     (gnus-group-ham-exit-processor-copy          ham spam-use-ham-copy)
-    (gnus-group-ham-exit-processor-spamassassin  ham spam-use-ham-spamassassin)
+    (gnus-group-ham-exit-processor-spamassassin  ham spam-use-spamassassin)
     (gnus-group-ham-exit-processor-spamoracle    ham spam-use-spamoracle))
   "The `spam-list-of-processors' list.
 This list contains pairs associating a ham/spam exit processor
@@ -963,6 +963,7 @@ Respects the process/prefix convention."
     (spam-use-regex-body               .       spam-check-regex-body)
     (spam-use-whitelist                .       spam-check-whitelist)
     (spam-use-BBDB                     .       spam-check-BBDB)
+    (spam-use-BBDB-exclusive           .       spam-check-BBDB)
     (spam-use-ifile                    .       spam-check-ifile)
     (spam-use-spamoracle               .       spam-check-spamoracle)
     (spam-use-stat                     .       spam-check-stat)
@@ -1247,7 +1248,7 @@ functions")
                            gnus-newsgroup-articles
                            classification)))
        ;; process them
-       (gnus-message 5 "%s %d %s articles with classification %s, check %s"
+       (gnus-message 5 "%s %d %s articles as %s using backend %s"
                      (if unregister "Unregistering" "Registering")
                      (length articles)
                      (if specific-articles "specific" "")
@@ -1279,8 +1280,10 @@ functions")
           type
           cell-list))
 
-      (gnus-error 5 (format "%s called with bad ID, type, classification, check, or group"
-                           "spam-log-processing-to-registry")))))
+      (gnus-error 
+       5 
+       (format "%s call with bad ID, type, classification, spam-check, or group"
+              "spam-log-processing-to-registry")))))
 
 ;;; check if a ham- or spam-processor registration has been done
 (defun spam-log-registered-p (id type)
@@ -1289,8 +1292,10 @@ functions")
             (spam-process-type-valid-p type))
        (cdr-safe (gnus-registry-fetch-extra id type))
       (progn
-       (gnus-error 5 (format "%s called with bad ID, type, classification, or check"
-                             "spam-log-registered-p"))
+       (gnus-error 
+        5 
+        (format "%s called with bad ID, type, classification, or spam-check"
+                "spam-log-registered-p"))
        nil))))
 
 ;;; check what a ham- or spam-processor registration says
@@ -1325,8 +1330,10 @@ functions")
                (setq found t))))
          found)
       (progn
-       (gnus-error 5 (format "%s called with bad ID, type, classification, or check"
-                             "spam-log-unregistration-needed-p"))
+       (gnus-error 
+        5 
+        (format "%s called with bad ID, type, classification, or spam-check"
+                "spam-log-unregistration-needed-p"))
        nil))))
 
 
@@ -1349,7 +1356,7 @@ functions")
           type
           new-cell-list))
       (progn
-       (gnus-error 5 (format "%s called with bad ID, type, check, or group"
+       (gnus-error 5 (format "%s call with bad ID, type, spam-check, or group"
                              "spam-log-undo-registration"))
        nil))))
 
@@ -1976,7 +1983,7 @@ REMOVE not nil, remove the ADDRESSES."
                  (goto-char (point-min))
                  (when (re-search-forward "^X-Spam: yes;" nil t)
                    spam-split-group))
-             (error "Error running spamoracle" status))))))))
+             (error "Error running spamoracle: %s" status))))))))
 
 (defun spam-spamoracle-learn (articles article-is-spam-p &optional unregister)
   "Run spamoracle in training mode."
@@ -1998,8 +2005,8 @@ REMOVE not nil, remove the ADDRESSES."
                           `("-f" ,spam-spamoracle-database
                             "add" ,arg)
                         `("add" ,arg)))))
-         (when (not (eq 0 status))
-           (error "Error running spamoracle" status)))))))
+         (unless (eq 0 status)
+           (error "Error running spamoracle: %s" status)))))))
 
 (defun spam-spamoracle-learn-ham (articles &optional unregister)
   (spam-spamoracle-learn articles nil unregister))
@@ -2097,10 +2104,10 @@ REMOVE not nil, remove the ADDRESSES."
 (defun spam-spamassassin-register-ham-routine (articles &optional unregister)
   (spam-spamassassin-register-with-sa-learn articles nil unregister))
 
-(defun spam-assassin-register-spam-routine (articles)
+(defun spam-spamassassin-unregister-spam-routine (articles)
   (spam-spamassassin-register-with-sa-learn articles t t))
 
-(defun spam-assassin-register-ham-routine (articles)
+(defun spam-spamassassin-unregister-ham-routine (articles)
   (spam-spamassassin-register-with-sa-learn articles nil t))
 \f
 ;;;; Hooks