From: hmurata Date: Thu, 27 Nov 2003 08:21:27 +0000 (+0000) Subject: * elmo-spam.el (elmo-spam-processor): Added 3rd argument X-Git-Tag: wl-2_11_23~41 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bede68a2b742a97316537183f9210cafdbc9320;p=elisp%2Fwanderlust.git * elmo-spam.el (elmo-spam-processor): Added 3rd argument `if-exists'. * wl-spam.el (wl-spam-save-status): Dose not initialize processor if no need. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index dd241e5..f797f4f 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2003-11-27 Hiroya Murata + + * elmo-spam.el (elmo-spam-processor): Added 3rd argument + `if-exists'. + 2003-11-23 Hiroya Murata * elmo-multi.el (elmo-folder-newsgroups): Simplify. diff --git a/elmo/elmo-spam.el b/elmo/elmo-spam.el index febf103..5bf47ec 100644 --- a/elmo/elmo-spam.el +++ b/elmo/elmo-spam.el @@ -172,13 +172,14 @@ If optional argument RESTORE is non-nil, unregister from spam list.") (defvar elmo-spam-processor-internal nil) -(defun elmo-spam-processor () +(defun elmo-spam-processor (&optional if-exists) (or elmo-spam-processor-internal - (let* ((scheme (or elmo-spam-scheme 'generic)) - (class (intern (format "elsp-%s" scheme)))) - (require class) - (setq elmo-spam-processor-internal - (luna-make-entity class))))) + (unless if-exists + (let* ((scheme (or elmo-spam-scheme 'generic)) + (class (intern (format "elsp-%s" scheme)))) + (require class) + (setq elmo-spam-processor-internal + (luna-make-entity class)))))) (require 'product) (product-provide (provide 'elmo-spam) (require 'elmo-version)) diff --git a/wl/ChangeLog b/wl/ChangeLog index 2de3b7f..5e12bf1 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2003-11-27 Hiroya Murata + + * wl-spam.el (wl-spam-save-status): Dose not initialize processor + if no need. + 2003-11-22 Hiroya Murata * wl-spam.el (wl-spam-auto-check-folder-regexp-list): Changed diff --git a/wl/wl-spam.el b/wl/wl-spam.el index a9d810e..1a7fee4 100644 --- a/wl/wl-spam.el +++ b/wl/wl-spam.el @@ -152,8 +152,9 @@ See `wl-summary-mark-action-list' for the detail of element." (defun wl-spam-save-status (&optional force) (interactive "P") - (let ((processor (elmo-spam-processor))) - (when (or force (elmo-spam-modified-p processor)) + (let ((processor (elmo-spam-processor (not force)))) + (when (or force + (and processor (elmo-spam-modified-p processor))) (elmo-spam-save-status processor)))) ;; insinuate into summary mode