From: hmurata Date: Wed, 15 Nov 2006 02:18:29 +0000 (+0000) Subject: (elmo-spam-bsfilter-use-remote): New user option. X-Git-Tag: wl-2_15_6-fixes~112 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b61876d23368a1c212c8869446a1c5bfc7ab16c7;p=elisp%2Fwanderlust.git (elmo-spam-bsfilter-use-remote): New user option. (elmo-spam-list-spam-messages): Check it option. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 725a3f3..ea7cc85 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2006-11-15 Hiroya Murata + + * elsp-bsfilter.el (elmo-spam-bsfilter-use-remote): New user option. + (elmo-spam-list-spam-messages): Check it option. + 2006-11-08 Tetsurou Okazaki * elmo-util.el (elmo-with-progress-display): Return the value diff --git a/elmo/elsp-bsfilter.el b/elmo/elsp-bsfilter.el index 36bd1ad..8c1a26b 100644 --- a/elmo/elsp-bsfilter.el +++ b/elmo/elsp-bsfilter.el @@ -77,6 +77,20 @@ :type 'integer :group 'elmo-spam-bsfilter) +(defcustom elmo-spam-bsfilter-use-remote + (and elmo-spam-bsfilter-shell-program + (let ((program (file-name-nondirectory + elmo-spam-bsfilter-shell-program)) + (remote-shells '("ssh" "rsh"))) + (catch 'found + (dolist (shell remote-shells) + (when (string-match (concat "\\`" shell) program) + (throw 'found t))) + nil))) + "*Non-nil disables local file feature." + :type 'boolean + :group 'elmo-spam-bsfilter) + (defcustom elmo-spam-bsfilter-debug nil "Non-nil to debug elmo bsfilter spam backend." :type 'boolean @@ -155,7 +169,8 @@ (luna-define-method elmo-spam-list-spam-messages :around ((processor elsp-bsfilter) folder &optional numbers) - (if (not (elmo-folder-message-file-p folder)) + (if (or elmo-spam-bsfilter-use-remote + (not (elmo-folder-message-file-p folder))) (luna-call-next-method) (let* ((nth-of-targets (1- (or elmo-spam-bsfilter-max-files-per-process 100)))