From: hmurata Date: Sat, 17 Jan 2004 15:02:09 +0000 (+0000) Subject: (elmo-spam-bsfilter-shell-program): Set default X-Git-Tag: wl-2_11_24~32 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09f215776bab0b540a151d02d0eb91995465dc17;p=elisp%2Fwanderlust.git (elmo-spam-bsfilter-shell-program): Set default value as "ruby". (elmo-spam-bsfilter-shell-switch): Set default value as nil. (elmo-spam-bsfilter-program): Set default value as full path for `bsfilter'. (elmo-spam-bsfilter-debug): New user option. (elsp-bsfilter-call-bsfilter): If elmo-spam-bsfilter-debug is non-nil, insert output in buffer for debug. Fix treating of argument. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index d51831e..85caf9b 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,15 @@ +2004-01-17 Hiroya Murata + + * elsp-bsfilter.el (elmo-spam-bsfilter-shell-program): Set default + value as "ruby". + (elmo-spam-bsfilter-shell-switch): Set default value as nil. + (elmo-spam-bsfilter-program): Set default value as full path for + `bsfilter'. + (elmo-spam-bsfilter-debug): New user option. + (elsp-bsfilter-call-bsfilter): If elmo-spam-bsfilter-debug is + non-nil, insert output in buffer for debug. Fix treating of + argument. + 2004-01-16 Hiroya Murata * elmo-maildir.el (elmo-map-folder-set-flag): Use cdr of diff --git a/elmo/elsp-bsfilter.el b/elmo/elsp-bsfilter.el index 8444c9c..98835ea 100644 --- a/elmo/elsp-bsfilter.el +++ b/elmo/elsp-bsfilter.el @@ -36,18 +36,17 @@ "Spam bsfilter configuration." :group 'elmo-spam) -(defcustom elmo-spam-bsfilter-shell-program (or explicit-shell-file-name - shell-file-name) +(defcustom elmo-spam-bsfilter-shell-program "ruby" "*" :type 'string :group 'elmo-spam-bsfilter) -(defcustom elmo-spam-bsfilter-shell-switch shell-command-switch +(defcustom elmo-spam-bsfilter-shell-switch nil "*" :type 'string :group 'elmo-spam-bsfilter) -(defcustom elmo-spam-bsfilter-program "bsfilter" +(defcustom elmo-spam-bsfilter-program (exec-installed-p "bsfilter") "*Program name of the Bsfilter." :type '(string :tag "Program name of the bsfilter") :group 'elmo-spam-bsfilter) @@ -68,6 +67,11 @@ (const :tag "Use the default")) :group 'elmo-spam-bsfilter) +(defcustom elmo-spam-bsfilter-debug nil + "Non-nil to debug elmo bsfilter spam backend." + :type 'boolean + :group 'elmo-spam-bsfilter-debug) + (eval-and-compile (luna-define-class elsp-bsfilter (elsp-generic))) @@ -75,11 +79,13 @@ (apply #'call-process-region (point-min) (point-max) elmo-spam-bsfilter-shell-program - nil nil nil - (append (list elmo-spam-bsfilter-shell-switch - elmo-spam-bsfilter-program) - elmo-spam-bsfilter-args - (delq nil (elmo-flatten args))))) + nil (if elmo-spam-bsfilter-debug + (get-buffer-create "*Debug ELMO Bsfilter*")) + nil (delq nil + (append (list elmo-spam-bsfilter-shell-switch + elmo-spam-bsfilter-program) + elmo-spam-bsfilter-args + (elmo-flatten args))))) (luna-define-method elmo-spam-buffer-spam-p ((processor elsp-bsfilter) buffer &optional register)