From: yamaoka Date: Tue, 10 Jun 2003 23:25:47 +0000 (+0000) Subject: Synch to Gnus 200306101716. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c85c43bc99e97e32da0aa820d2a482d36f2dce0;p=elisp%2Fgnus.git- Synch to Gnus 200306101716. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 16514eb..d649eec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-06-10 Teodor Zlatanov + + * spam.el (spam-check-bogofilter-headers): fix for when the score + is requested but the message is not spam + 2003-06-09 Teodor Zlatanov From Eric Knauel diff --git a/lisp/spam.el b/lisp/spam.el index 95d23a8..70726fe 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -1040,13 +1040,15 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." ;;;; Bogofilter (defun spam-check-bogofilter-headers (&optional score) (let ((header (message-fetch-field spam-bogofilter-header))) - (when (and header - (string-match spam-bogofilter-bogosity-positive-spam-header - header)) - (if score - (when (string-match "spamicity=\\([0-9.]+\\)" header) - (match-string 1 header)) - spam-split-group)))) + (when header ; return nil when no header + (if score ; scoring mode + (if (string-match "spamicity=\\([0-9.]+\\)" header) + (match-string 1 header) + "0") + ;; spam detection mode + (when (string-match spam-bogofilter-bogosity-positive-spam-header + header) + spam-split-group))))) ;; return something sensible if the score can't be determined (defun spam-bogofilter-score ()