Function: spam-stat-buffer-words
spam-stat-buffer-words is a byte-compiled function defined in
spam-stat.el.gz.
Signature
(spam-stat-buffer-words)
Documentation
Return a hash table of words and number of occurrences in the buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/spam-stat.el.gz
(defun spam-stat-buffer-words ()
"Return a hash table of words and number of occurrences in the buffer."
(run-hooks 'spam-stat-washing-hook)
(with-spam-stat-max-buffer-size
(with-syntax-table spam-stat-syntax-table
(goto-char (point-min))
(let ((result (make-hash-table :test 'equal))
word count)
(while (re-search-forward "\\w+" nil t)
(setq word (match-string-no-properties 0)
count (1+ (gethash word result 0)))
(when (< (length word) spam-stat-max-word-length)
(puthash word count result)))
result))))