(elmo-spam-bsfilter-shell-program): Set default
authorhmurata <hmurata>
Sat, 17 Jan 2004 15:02:09 +0000 (15:02 +0000)
committerhmurata <hmurata>
Sat, 17 Jan 2004 15:02:09 +0000 (15:02 +0000)
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.

elmo/ChangeLog
elmo/elsp-bsfilter.el

index d51831e..85caf9b 100644 (file)
@@ -1,3 +1,15 @@
+2004-01-17  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-maildir.el (elmo-map-folder-set-flag): Use cdr of
index 8444c9c..98835ea 100644 (file)
   "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)
                 (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)))
 
   (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)