From 3d2197e6e684679770fec7015b0fcf97ef2c75e3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 21 Jan 2004 03:06:41 +0000 Subject: [PATCH] Synch to No Gnus 200401210304. --- lisp/ChangeLog | 2 ++ lisp/spam-stat.el | 20 +++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3dba533..947021f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,8 @@ * spam-stat.el (spam-stat-test-directory): New optional argument displays a list of files detected. Suggested by Andrew Cohen . + (spam-stat-buffer-words-with-scores): Don't narrow and change + syntax table here. Reported by Andrew Cohen . 2004-01-20 Teodor Zlatanov diff --git a/lisp/spam-stat.el b/lisp/spam-stat.el index 97aa160..3602a69 100644 --- a/lisp/spam-stat.el +++ b/lisp/spam-stat.el @@ -433,17 +433,15 @@ The default score for unknown words is stored in These are the words whose spam-stat differs the most from 0.5. The list returned contains elements of the form \(WORD SCORE DIFF), where DIFF is the difference between SCORE and 0.5." - (with-spam-stat-max-buffer-size - (with-syntax-table spam-stat-syntax-table - (let (result word score) - (maphash (lambda (word ignore) - (setq score (spam-stat-score-word word) - result (cons (list word score (abs (- score 0.5))) - result))) - (spam-stat-buffer-words)) - (setq result (sort result (lambda (a b) (< (nth 2 b) (nth 2 a))))) - (setcdr (nthcdr 14 result) nil) - result)))) + (let (result word score) + (maphash (lambda (word ignore) + (setq score (spam-stat-score-word word) + result (cons (list word score (abs (- score 0.5))) + result))) + (spam-stat-buffer-words)) + (setq result (sort result (lambda (a b) (< (nth 2 b) (nth 2 a))))) + (setcdr (nthcdr 14 result) nil) + result)) (defun spam-stat-score-buffer () "Return a score describing the spam-probability for this buffer." -- 1.7.10.4