(when (stringp group) ; this routine will do nothing
; without a valid group
(dolist (article articles)
- (when (spam-group-spam-mark-p gnus-newsgroup-name
- (gnus-summary-article-mark article))
+ (when (spam-group-ham-mark-p gnus-newsgroup-name
+ (gnus-summary-article-mark article))
(push article tomove)))
;; now do the actual move
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(interactive)
-
- (dolist (check spam-list-of-statistical-checks)
- (when (symbol-value check)
- (widen)
- (gnus-message 8 "spam-split: widening the buffer (%s requires it)"
- (symbol-name check))
- (return)))
-;; (progn (widen) (debug (buffer-string)))
- (let ((list-of-checks spam-list-of-checks)
- decision)
- (while (and list-of-checks (not decision))
- (let ((pair (pop list-of-checks)))
- (when (symbol-value (car pair))
- (gnus-message 5 "spam-split: calling the %s function" (symbol-name (cdr pair)))
- (setq decision (funcall (cdr pair))))))
- (if (eq decision t)
- nil
- decision)))
-
+ (save-excursion
+ (save-restriction
+ (dolist (check spam-list-of-statistical-checks)
+ (when (symbol-value check)
+ (widen)
+ (gnus-message 8 "spam-split: widening the buffer (%s requires it)"
+ (symbol-name check))
+ (return)))
+ ;; (progn (widen) (debug (buffer-string)))
+ (let ((list-of-checks spam-list-of-checks)
+ decision)
+ (while (and list-of-checks (not decision))
+ (let ((pair (pop list-of-checks)))
+ (when (symbol-value (car pair))
+ (gnus-message 5 "spam-split: calling the %s function" (symbol-name (cdr pair)))
+ (setq decision (funcall (cdr pair))))))
+ (if (eq decision t)
+ nil
+ decision)))))
+
(defun spam-setup-widening ()
(dolist (check spam-list-of-statistical-checks)
(when (symbol-value check)
(save-window-excursion
(gnus-summary-show-article t)
(set-buffer gnus-article-buffer)
- (let ((score (spam-check-bogofilter t)))
+ (let ((score (or (spam-check-bogofilter-headers t)
+ (spam-check-bogofilter t))))
(message "Spamicity score %s" score)
(or score "0"))))