* wl-refile.el (wl-refile-guess): Added second argument `functions'.
authorhmurata <hmurata>
Mon, 20 Oct 2003 08:39:17 +0000 (08:39 +0000)
committerhmurata <hmurata>
Mon, 20 Oct 2003 08:39:17 +0000 (08:39 +0000)
* wl-action.el (wl-auto-refile-guess-functions): New variable.
(wl-summary-auto-refile): Call wl-refile-guess with
wl-auto-refile-guess-functions instead of wl-refile-guess-by-rule.

wl/ChangeLog
wl/wl-action.el
wl/wl-refile.el

index 2a522e1..16ff9e0 100644 (file)
@@ -1,3 +1,11 @@
+2003-10-20  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-refile.el (wl-refile-guess): Added second argument `functions'.
+
+       * wl-action.el (wl-auto-refile-guess-functions): New variable.
+       (wl-summary-auto-refile): Call wl-refile-guess with
+       wl-auto-refile-guess-functions instead of wl-refile-guess-by-rule.
+
 2003-10-17  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-summary.el (wl-summary-pack-number): Call wl-summary-rescan
index ea4bf58..f4007da 100644 (file)
@@ -791,6 +791,10 @@ Return number if put mark succeed"
   (member (wl-summary-message-mark wl-summary-buffer-elmo-folder number)
          wl-summary-auto-refile-skip-marks))
 
+(defvar wl-auto-refile-guess-functions
+  '(wl-refile-guess-by-rule)
+  "*List of functions which is used for guessing refile destination folder.")
+
 (defun wl-summary-auto-refile (&optional open-all)
   "Set refile mark automatically according to 'wl-refile-guess-by-rule'."
   (interactive "P")
@@ -818,9 +822,10 @@ Return number if put mark succeed"
                           number))
                     (setq dst
                           (wl-folder-get-realname
-                           (wl-refile-guess-by-rule
+                           (wl-refile-guess
                             (elmo-message-entity wl-summary-buffer-elmo-folder
-                                                 number))))
+                                                 number)
+                            wl-auto-refile-guess-functions)))
                     (not (equal dst spec))
                     (let ((pair (assoc dst checked-dsts))
                           ret)
index 607e410..6a294ad 100644 (file)
 (elmo-define-obsolete-variable 'wl-refile-guess-func-list
                               'wl-refile-guess-functions)
 
-(defun wl-refile-guess (entity)
-  (let ((flist wl-refile-guess-functions) guess)
+(defun wl-refile-guess (entity &optional functions)
+  (let ((flist (or functions wl-refile-guess-functions))
+       guess)
     (while flist
       (if (setq guess (funcall (car flist) entity))
          (setq flist nil)