From: hmurata Date: Sat, 24 Jan 2004 12:10:36 +0000 (+0000) Subject: * elsp-bogofilter.el (elmo-spam-bogofilter-arguments-alist): X-Git-Tag: wl-2_11_24~21 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87901e98f2e27df74dbd16056e7b37408e06e691;p=elisp%2Fwanderlust.git * elsp-bogofilter.el (elmo-spam-bogofilter-arguments-alist): Added "-vv" if elmo-spam-bogofilter-debug is non-nil. (elmo-spam-bogofilter-call): Fixed the last change. (elmo-spam-bogofilter-arguments): Ditto. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 48df703..7e12506 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,6 +1,11 @@ 2004-01-24 Hiroya Murata * elsp-bogofilter.el (elmo-spam-bogofilter-arguments-alist): + Added "-vv" if elmo-spam-bogofilter-debug is non-nil. + (elmo-spam-bogofilter-call): Fixed the last change. + (elmo-spam-bogofilter-arguments): Ditto. + + * elsp-bogofilter.el (elmo-spam-bogofilter-arguments-alist): Follow the options change of latest bogofilter. * elsp-bogofilter.el (elmo-spam-bogofilter-spam-switch): Abolish. diff --git a/elmo/elsp-bogofilter.el b/elmo/elsp-bogofilter.el index 7000307..6cda961 100644 --- a/elmo/elsp-bogofilter.el +++ b/elmo/elsp-bogofilter.el @@ -53,18 +53,23 @@ :group 'elmo-spam-bogofilter) (defcustom elmo-spam-bogofilter-arguments-alist - '((classify . ((if register "-u") - (if elmo-spam-bogofilter-database-directory - (list "-d" elmo-spam-bogofilter-database-directory)))) - (register . ((if spam "-s" "-n") - (if restore (if spam "-N" "-S")) - (if elmo-spam-bogofilter-database-directory - (list "-d" elmo-spam-bogofilter-database-directory))))) + '((classify + (if elmo-spam-bogofilter-debug "-vv") + (if register "-u") + (if elmo-spam-bogofilter-database-directory + (list "-d" elmo-spam-bogofilter-database-directory))) + (register + (if elmo-spam-bogofilter-debug "-vv") + (if spam "-s" "-n") + (if restore (if spam "-N" "-S")) + (if elmo-spam-bogofilter-database-directory + (list "-d" elmo-spam-bogofilter-database-directory)))) "*An alist of options that are used with call bogofilter process. Each element is a list of following: -\(TYPE . LIST-EXP) +\(TYPE [SEXP...]) TYPE is a symbol from `classify' or `register'. -LIST-EXP is an expression to get list of options." +SEXP is an expression to get options. +Must be return a string or list of string." :type '(repeat (cons (choice (const :tag "Classify" classify) (const :tag "Register" register)) (repeat sexp))) @@ -79,19 +84,20 @@ LIST-EXP is an expression to get list of options." (eval-and-compile (luna-define-class elsp-bogofilter (elsp-generic))) -(defsubst elmo-spam-bogofilter-call (&rest args) +(defsubst elmo-spam-bogofilter-call (&optional args) (apply #'call-process-region (point-min) (point-max) elmo-spam-bogofilter-program nil (if elmo-spam-bogofilter-debug (get-buffer-create "*Debug ELMO SPAM Bogofilter*")) nil - (delq nil (append elmo-spam-bogofilter-args - (elmo-flatten args))))) + (append elmo-spam-bogofilter-args + (delq nil args)))) (defmacro elmo-spam-bogofilter-arguments (type) - `(mapcar #'eval - (cdr (assq ,type elmo-spam-bogofilter-arguments-alist)))) + `(elmo-flatten + (mapcar #'eval + (cdr (assq ,type elmo-spam-bogofilter-arguments-alist))))) (luna-define-method elmo-spam-buffer-spam-p ((processor elsp-bogofilter) buffer &optional register)