* wl-refile.el (wl-refile-learn): Simplified. Use `memq'
authorokazaki <okazaki>
Mon, 28 Aug 2000 08:38:59 +0000 (08:38 +0000)
committerokazaki <okazaki>
Mon, 28 Aug 2000 08:38:59 +0000 (08:38 +0000)
instead of `member' for `wl-refile-guess-func-list' look-ups.
Use `cons' instead of `add-to-list' to update `wl-refile-alist'.

wl/wl-refile.el

index 0b25900..607b105 100644 (file)
                  (wl-address-header-extract-address
                   (elmo-msgdb-overview-entity-get-from 
                    entity)))))
-         (setq key from)))
-    (if (not ml)
-       (progn
-         (if (or wl-refile-msgid-alist
-                 (member 'wl-refile-guess-by-msgid
-                         wl-refile-guess-func-list))
-             (wl-refile-msgid-learn entity dst))
-         (if (or wl-refile-subject-alist
-                 (member 'wl-refile-guess-by-subject
-                         wl-refile-guess-func-list))
-             (wl-refile-subject-learn entity dst))))
+         (setq key from))
+      (if (or wl-refile-msgid-alist
+             (memq 'wl-refile-guess-by-msgid
+                   wl-refile-guess-func-list))
+         (wl-refile-msgid-learn entity dst))
+      (if (or wl-refile-subject-alist
+             (memq 'wl-refile-guess-by-subject
+                   wl-refile-guess-func-list))
+         (wl-refile-subject-learn entity dst)))
     (when key
       (if (setq hit (assoc key wl-refile-alist))
           (setq wl-refile-alist (delq hit wl-refile-alist)))
-      (add-to-list 'wl-refile-alist (cons key dst)))))
+      (setq wl-refile-alist (cons (cons key dst)
+                                 wl-refile-alist)))))
 
 (defun wl-refile-msgid-learn (entity dst)
   (let ((key (elmo-msgdb-overview-entity-get-id entity))