Synch to No Gnus 200401210103.
authoryamaoka <yamaoka>
Wed, 21 Jan 2004 01:13:33 +0000 (01:13 +0000)
committeryamaoka <yamaoka>
Wed, 21 Jan 2004 01:13:33 +0000 (01:13 +0000)
lisp/ChangeLog
lisp/spam.el

index b568884..65a8a5a 100644 (file)
@@ -1,5 +1,12 @@
 2004-01-20  Teodor Zlatanov  <tzz@lifelogs.com>  
-       From Hubert Chan <hubert@uhoreg.ca>.
+
+       * spam.el (gnus-summary-mode-map): make spam-generic-score the
+       default scoring function
+       (spam-generic-score): calls spam-spamassassin-score if
+       spam-use-spamassassin or spam-use-spamassassin-headers is on;
+       spam-bogofilter-score otherwise.
+
+       From Hubert Chan <hubert@uhoreg.ca>:
 
        * spam.el (spam-use-spamassassin, spam-use-spamassassin-headers)
        (spam-install-hooks, spam-spamassassin, spam-spamassassin-path)
index dc1a24a..451a340 100644 (file)
@@ -499,9 +499,9 @@ order for SpamAssassin to recognize the new registered spam."
 ;;; Key bindings for spam control.
 
 (gnus-define-keys gnus-summary-mode-map
-  "St" spam-bogofilter-score
+  "St" spam-generic-score
   "Sx" gnus-summary-mark-as-spam
-  "Mst" spam-bogofilter-score
+  "Mst" spam-generic-score
   "Msx" gnus-summary-mark-as-spam
   "\M-d" gnus-summary-mark-as-spam)
 
@@ -667,6 +667,15 @@ Respects the process/prefix convention."
     (gnus-summary-remove-process-mark article)
     (spam-report-gmane article)))
 
+(defun spam-generic-score ()
+  (interactive)
+  "Invoke whatever scoring method we can."
+  (if (or
+       spam-use-spamassassin
+       spam-use-spamassassin-headers)
+      (spam-spamassassin-score)
+    (spam-bogofilter-score)))
+
 ;;; Summary entry and exit processing.
 
 (defun spam-summary-prepare ()