(spam-bogofilter-score): rewrote function, finally works right
authorTeodor Zlatanov <tzz@lifelogs.com>
Thu, 16 Jan 2003 00:41:08 +0000 (00:41 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Thu, 16 Jan 2003 00:41:08 +0000 (00:41 +0000)
lisp/spam.el

index 44e033e..1a4814b 100644 (file)
@@ -780,9 +780,12 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
 (defun spam-bogofilter-score ()
   "Get the Bogofilter spamicity score"
   (interactive)
-  (let ((score (spam-check-bogofilter t)))
-    (message "Spamicity score %s" score)
-    (or score "0")))
+  (save-window-excursion
+    (gnus-summary-show-article t)
+    (set-buffer gnus-article-buffer)
+    (let ((score (spam-check-bogofilter t)))
+      (message "Spamicity score %s" score)
+      (or score "0"))))
 
 (defun spam-check-bogofilter (&optional score)
   "Check the Bogofilter backend for the classification of this message"