+2003-10-25 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elsp-spamfilter.el (elsp-spamfilter): Added new slot `modified'.
+ (elmo-spam-modified-p): Defined.
+ (elmo-spam-save-status): Set `modified' slot to nil.
+ (elmo-spam-register-spam-buffer): Set `modified' slot to non nil.
+ (elmo-spam-register-good-buffer): Ditto.
+
+ * elmo-spam.el (elmo-spam-modified-p): New API.
+
2003-10-23 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Abolish
"Register contents of BUFFER as non spam.
PROCESSOR is spam processor structure.")
+(luna-define-generic elmo-spam-modified-p (processor)
+ "Return non-nil if status of PROCESSOR is modified.")
+
(luna-define-generic elmo-spam-save-status (processor)
"Save status of the PROCESSOR.")
(eval-and-compile
(luna-define-class elsp-spamfilter (elsp-generic)
- (good-corpus bad-corpus))
+ (good-corpus bad-corpus modified))
(luna-define-internal-accessors 'elsp-spamfilter))
(luna-define-method initialize-instance :around ((processor elsp-spamfilter)
(elsp-spamfilter-set-bad-corpus-internal processor spamf-bad-corpus)
processor))
+(luna-define-method elmo-spam-modified-p ((processor elsp-spamfilter))
+ (elsp-spamfilter-modified-internal processor))
+
(luna-define-method elmo-spam-save-status ((processor elsp-spamfilter))
(spamf-save-corpus-to-file
elmo-spam-spamfilter-corpus-filename
(elsp-spamfilter-good-corpus-internal processor)
- (elsp-spamfilter-bad-corpus-internal processor)))
+ (elsp-spamfilter-bad-corpus-internal processor))
+ (elsp-spamfilter-set-modified-internal processor nil))
(defun elmo-spam-spamfilter-decode-buffer (buffer)
(mime-display-message
(elmo-spam-spamfilter-decode-buffer buffer)
(spamf-register-good-buffer
(current-buffer)
- (elsp-spamfilter-good-corpus-internal processor))))
+ (elsp-spamfilter-good-corpus-internal processor))
+ (elsp-spamfilter-set-modified-internal processor t)))
(luna-define-method elmo-spam-register-good-buffer ((processor elsp-spamfilter)
buffer)
(elmo-spam-spamfilter-decode-buffer buffer)
(spamf-register-spam-buffer
(current-buffer)
- (elsp-spamfilter-bad-corpus-internal processor))))
+ (elsp-spamfilter-bad-corpus-internal processor))
+ (elsp-spamfilter-set-modified-internal processor t)))
(require 'product)
(product-provide (provide 'elsp-spamfilter) (require 'elmo-version))
+2003-10-25 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * wl-spam.el (wl-spam-save-status): Call elmo-spam-save-status
+ when new optional argument `force' is non nil or modified.
+
2003-10-21 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl.el (toplevel): Require wl-spam when compile.
numbers))
(message "Register good messages...done")))
-(defun wl-spam-save-status ()
- (interactive)
- (elmo-spam-save-status (elmo-spam-processor)))
+(defun wl-spam-save-status (&optional force)
+ (interactive "P")
+ (let ((processor (elmo-spam-processor)))
+ (when (or force (elmo-spam-modified-p processor))
+ (elmo-spam-save-status processor))))
;; insinuate into summary mode
(defvar wl-summary-spam-map nil)