Function: spam-stat-save
spam-stat-save is an interactive and byte-compiled function defined in
spam-stat.el.gz.
Signature
(spam-stat-save &optional FORCE)
Documentation
Save the spam-stat hash table as lisp file.
With a prefix argument save unconditionally.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/spam-stat.el.gz
;; Saving and Loading
(defun spam-stat-save (&optional force)
"Save the `spam-stat' hash table as lisp file.
With a prefix argument save unconditionally."
(interactive "P")
(when (or force spam-stat-dirty)
(let ((coding-system-for-write spam-stat-coding-system))
(with-temp-file spam-stat-file
(let ((standard-output (current-buffer)))
(insert (format ";-*- coding: %s; -*-\n" spam-stat-coding-system))
(insert (format "(setq spam-stat-ngood %d spam-stat-nbad %d
spam-stat (spam-stat-to-hash-table '(" spam-stat-ngood spam-stat-nbad))
(maphash (lambda (word entry)
(prin1 (list word
(spam-stat-good entry)
(spam-stat-bad entry))))
spam-stat)
(insert ")))"))))
(message "Saved %s." spam-stat-file)
(setq spam-stat-dirty nil
spam-stat-last-saved-at (file-attribute-modification-time
(file-attributes spam-stat-file)))))