Function: spam-stat-score-buffer

spam-stat-score-buffer is an interactive and byte-compiled function defined in spam-stat.el.gz.

Signature

(spam-stat-score-buffer)

Documentation

Return a score describing the spam-probability for this buffer.

Add user supplied modifications if supplied.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/spam-stat.el.gz
(defun spam-stat-score-buffer ()
  "Return a score describing the spam-probability for this buffer.
Add user supplied modifications if supplied."
  (interactive) ; helps in debugging.
  (setq spam-stat-score-data (spam-stat-buffer-words-with-scores))
  (let* ((probs (mapcar #'cadr spam-stat-score-data))
	 (prod (apply #'* probs))
	 (score0
          (/ prod (+ prod (apply #'* (mapcar (lambda (x) (- 1 x))
					     probs)))))
	 (score1s
	  (condition-case nil
	      (spam-stat-score-buffer-user score0)
	    (error nil)))
	 (ans
	  (if score1s (+ score0 score1s) score0)))
    (when (called-interactively-p 'any)
      (message "%S" ans))
    ans))