aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2009-09-29 02:20:21 +0000
committerJuanma Barranquero2009-09-29 02:20:21 +0000
commit0577a4301d6fbc39013ea2e17554c41d7bccc5ae (patch)
tree24d01c0c3f3132b2bcbc8832a0fe21cd078a270d
parentbaf0cb84bf02779e1fda3e34999fef5a5a8f3bab (diff)
downloademacs-0577a4301d6fbc39013ea2e17554c41d7bccc5ae.tar.gz
emacs-0577a4301d6fbc39013ea2e17554c41d7bccc5ae.zip
* spam-stat.el (spam-stat-load): Fix typo in message.
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/spam-stat.el20
2 files changed, 14 insertions, 10 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 39ec4899fc2..68bceb7ef13 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12009-09-29 Juanma Barranquero <lekktu@gmail.com>
2
3 * spam-stat.el (spam-stat-load): Fix typo in message.
4
12009-09-23 Juanma Barranquero <lekktu@gmail.com> 52009-09-23 Juanma Barranquero <lekktu@gmail.com>
2 6
3 * gnus-art.el (gnus-article-encrypt-body): 7 * gnus-art.el (gnus-article-encrypt-body):
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el
index a4d43a32d90..99d69f33bc3 100644
--- a/lisp/gnus/spam-stat.el
+++ b/lisp/gnus/spam-stat.el
@@ -180,7 +180,7 @@ no effect when spam-stat is invoked through spam.el."
180 180
181(defcustom spam-stat-score-buffer-user-functions nil 181(defcustom spam-stat-score-buffer-user-functions nil
182 "List of additional scoring functions. 182 "List of additional scoring functions.
183Called one by one on the buffer. 183Called one by one on the buffer.
184 184
185If all of these functions return non-nil answers, these numerical 185If all of these functions return non-nil answers, these numerical
186answers are added to the computed spam stat score on the buffer. If 186answers are added to the computed spam stat score on the buffer. If
@@ -442,12 +442,12 @@ spam-stat (spam-stat-to-hash-table '(" spam-stat-ngood spam-stat-nbad))
442 (null spam-stat-last-saved-at) 442 (null spam-stat-last-saved-at)
443 (not (equal spam-stat-last-saved-at 443 (not (equal spam-stat-last-saved-at
444 (nth 5 (file-attributes spam-stat-file))))) 444 (nth 5 (file-attributes spam-stat-file)))))
445 (progn 445 (progn
446 (load-file spam-stat-file) 446 (load-file spam-stat-file)
447 (setq spam-stat-dirty nil 447 (setq spam-stat-dirty nil
448 spam-stat-last-saved-at 448 spam-stat-last-saved-at
449 (nth 5 (file-attributes spam-stat-file))))) 449 (nth 5 (file-attributes spam-stat-file)))))
450 (t (message "Spam stat file not loaded: no change in disk.."))))) 450 (t (message "Spam stat file not loaded: no change in disk.")))))
451 451
452(defun spam-stat-to-hash-table (entries) 452(defun spam-stat-to-hash-table (entries)
453 "Turn list ENTRIES into a hash table and store as `spam-stat'. 453 "Turn list ENTRIES into a hash table and store as `spam-stat'.
@@ -503,11 +503,11 @@ where DIFF is the difference between SCORE and 0.5."
503(defun spam-stat-score-buffer () 503(defun spam-stat-score-buffer ()
504 "Return a score describing the spam-probability for this buffer. 504 "Return a score describing the spam-probability for this buffer.
505Add user supplied modifications if supplied." 505Add user supplied modifications if supplied."
506 (interactive) ; helps in debugging. 506 (interactive) ; helps in debugging.
507 (setq spam-stat-score-data (spam-stat-buffer-words-with-scores)) 507 (setq spam-stat-score-data (spam-stat-buffer-words-with-scores))
508 (let* ((probs (mapcar 'cadr spam-stat-score-data)) 508 (let* ((probs (mapcar 'cadr spam-stat-score-data))
509 (prod (apply #'* probs)) 509 (prod (apply #'* probs))
510 (score0 510 (score0
511 (/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x)) 511 (/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x))
512 probs))))) 512 probs)))))
513 (score1s 513 (score1s
@@ -517,17 +517,17 @@ Add user supplied modifications if supplied."
517 (error nil))) 517 (error nil)))
518 (ans 518 (ans
519 (if score1s (+ score0 score1s) score0))) 519 (if score1s (+ score0 score1s) score0)))
520 (when (interactive-p) 520 (when (interactive-p)
521 (message "%S" ans)) 521 (message "%S" ans))
522 ans)) 522 ans))
523 523
524(defun spam-stat-score-buffer-user (&rest args) 524(defun spam-stat-score-buffer-user (&rest args)
525 (let* ((scores 525 (let* ((scores
526 (mapcar 526 (mapcar
527 (lambda (fn) 527 (lambda (fn)
528 (apply fn args)) 528 (apply fn args))
529 spam-stat-score-buffer-user-functions))) 529 spam-stat-score-buffer-user-functions)))
530 (if (memq nil scores) nil 530 (if (memq nil scores) nil
531 (apply #'+ scores)))) 531 (apply #'+ scores))))
532 532
533(defun spam-stat-split-fancy () 533(defun spam-stat-split-fancy ()