From 5f1c0fb38a7fdb237f5c959dddd68997d7f5aefb Mon Sep 17 00:00:00 2001 From: hmurata Date: Sat, 22 Nov 2003 04:43:52 +0000 Subject: [PATCH] * samples/*/dot.wl: Update spam settings. * wl/wl-spam.el (wl-spam-auto-check-folder-regexp-list): Changed default value to nil. (wl-spam-setup): Added `wl-summary-auto-check-spam' to `wl-summary-prepare-hook'; Replace refile action to `wl-summary-exec-action-refile-with-register'. --- samples/en/dot.wl | 24 +++++------------------- samples/ja/dot.wl | 20 +++----------------- wl/ChangeLog | 6 ++++++ wl/wl-spam.el | 17 ++++++++++++++--- 4 files changed, 28 insertions(+), 39 deletions(-) diff --git a/samples/en/dot.wl b/samples/en/dot.wl index d108934..73fa9c7 100644 --- a/samples/en/dot.wl +++ b/samples/en/dot.wl @@ -365,18 +365,21 @@ ;(require 'wl-spam) +;; In moving to summary, judge whether a message is a spam. +;(setq wl-spam-auto-check-folder-regexp-list '("\\+inbox")) + ;; Judge *first* whether a message is a spam ;; when `o' (wl-summary-refile) is performed in a summary buffer. ;(unless (memq 'wl-refile-guess-by-spam wl-refile-guess-functions) ; (setq wl-refile-guess-functions -; (cons #'wl-refile-guess-by-spam +; (cons #'wl-refile-guess-by-spam ; wl-refile-guess-functions))) ;; Judge *first* whether a message is a spam ;; when `C-o' (wl-summary-auto-refile) is performed in a summary buffer. ;(unless (memq 'wl-refile-guess-by-spam wl-auto-refile-guess-functions) ; (setq wl-auto-refile-guess-functions -; (cons #'wl-refile-guess-by-spam +; (cons #'wl-refile-guess-by-spam ; wl-auto-refile-guess-functions))) ;; When you want to give priority to refile-rule (same as spamfilter-wl.el @@ -386,21 +389,4 @@ ; (append wl-auto-refile-guess-functions ; '(wl-refile-guess-by-spam)))) -;; In moving to each summary, judge whether a message is a spam -;; according to wl-spam-auto-check-folder-regexp-list. -;(add-hook 'wl-summary-prepared-pre-hook #'wl-summary-auto-check-spam) - -;; Make the spam processor learn at the time of execution of refile. -;; Even if the following setup was carried out, it does not always learn. -;; See the docstring of wl-spam-undecided-folder-regexp-list and -;; wl-spam-ignored-folder-regexp-list in wl-spam.el for details. -;(let ((actions wl-summary-mark-action-list) -; action) -; (while actions -; (setq action (car actions) -; actions (cdr actions)) -; (when (eq (wl-summary-action-symbol action) 'refile) -; (setcar (nthcdr 4 action) 'wl-summary-exec-action-refile-with-register) -; (setq actions nil)))) - ;;; dot.wl ends here diff --git a/samples/ja/dot.wl b/samples/ja/dot.wl index 08e313e..47d4437 100644 --- a/samples/ja/dot.wl +++ b/samples/ja/dot.wl @@ -374,6 +374,9 @@ ;(require 'wl-spam) +;; 移動した時に自動で spam かどうかチェックするフォルダを設定 +;(setq wl-spam-auto-check-folder-regexp-list '("\\+inbox")) + ;; サマリバッファで `o' (wl-summary-refile) した時, *最初*に spam かど ;; うかを判定する様にする ;(unless (memq 'wl-refile-guess-by-spam wl-refile-guess-functions) @@ -395,21 +398,4 @@ ; (append wl-auto-refile-guess-functions ; '(wl-refile-guess-by-spam)))) -;; wl-spam-auto-check-folder-regexp-list に合致するフォルダに移動した -;; 時に spam かどうかチェックする -;(add-hook 'wl-summary-prepared-pre-hook #'wl-summary-auto-check-spam) - -;; refile の実行時に学習させる為の設定 -;; 以下の設定をしたからと言って常に学習する訳ではありません. 詳しくは, -;; wl-spam.el の wl-spam-undecided-folder-regexp-list と -;; wl-spam-ignored-folder-regexp-list の docstring を参照して下さい. -;(let ((actions wl-summary-mark-action-list) -; action) -; (while actions -; (setq action (car actions) -; actions (cdr actions)) -; (when (eq (wl-summary-action-symbol action) 'refile) -; (setcar (nthcdr 4 action) 'wl-summary-exec-action-refile-with-register) -; (setq actions nil)))) - ;;; dot.wl ends here diff --git a/wl/ChangeLog b/wl/ChangeLog index d768c5f..2de3b7f 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,11 @@ 2003-11-22 Hiroya Murata + * wl-spam.el (wl-spam-auto-check-folder-regexp-list): Changed + default value to nil. + (wl-spam-setup): Added `wl-summary-auto-check-spam' to + `wl-summary-prepare-hook'; Replace refile action to + `wl-summary-exec-action-refile-with-register'. + * Version number is increased to 2.11.22. 2003-11-20 Hiroya Murata diff --git a/wl/wl-spam.el b/wl/wl-spam.el index f397b79..a9d810e 100644 --- a/wl/wl-spam.el +++ b/wl/wl-spam.el @@ -59,7 +59,7 @@ :type '(repeat (regexp :tag "Folder Regexp")) :group 'wl-spam) -(defcustom wl-spam-auto-check-folder-regexp-list '("[+.]inbox") +(defcustom wl-spam-auto-check-folder-regexp-list nil "*List of Folder regexp which check spam automatically." :type '(repeat (regexp :tag "Folder Regexp")) :group 'wl-spam) @@ -324,6 +324,15 @@ See `wl-summary-mark-action-list' for the detail of element." wl-spam-folder-name)) (defun wl-spam-setup () + (add-hook 'wl-summary-prepared-hook #'wl-summary-auto-check-spam) + (let ((actions wl-summary-mark-action-list) + action) + (while actions + (setq action (car actions) + actions (cdr actions)) + (when (eq (wl-summary-action-symbol action) 'refile) + (setcar (nthcdr 4 action) 'wl-summary-exec-action-refile-with-register) + (setq actions nil)))) (when wl-spam-mark-action-list (setq wl-summary-mark-action-list (append wl-summary-mark-action-list @@ -336,8 +345,10 @@ See `wl-summary-mark-action-list' for the detail of element." (cons (wl-summary-action-mark action) wl-summary-skip-mark-list)))) (define-key wl-summary-mode-map "k" wl-summary-spam-map) - (define-key wl-summary-mode-map "ms" 'wl-summary-target-mark-register-as-spam) - (define-key wl-summary-mode-map "mn" 'wl-summary-target-mark-register-as-good)) + (define-key + wl-summary-mode-map "ms" 'wl-summary-target-mark-register-as-spam) + (define-key + wl-summary-mode-map "mn" 'wl-summary-target-mark-register-as-good)) (require 'product) (product-provide (provide 'wl-spam) (require 'wl-version)) -- 1.7.10.4