2001-05-08 Kenichi OKADA <okada@opaopa.org>
authorokada <okada>
Tue, 8 May 2001 15:12:14 +0000 (15:12 +0000)
committerokada <okada>
Tue, 8 May 2001 15:12:14 +0000 (15:12 +0000)
* utils/bbdb-wl.el (bbdb-wl-folder-regexp): New variable.
(bbdb-wl-get-update-record): Use `bbdb-wl-folder-regexp'.

ChangeLog
doc/wl-ja.texi
doc/wl.texi
utils/bbdb-wl.el

index 6148586..b5b5fad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-08  Kenichi OKADA  <okada@opaopa.org>
+
+       * utils/bbdb-wl.el (bbdb-wl-folder-regexp): New variable.
+       (bbdb-wl-get-update-record): Use `bbdb-wl-folder-regexp'.
+
 2001-04-16  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * utils/bbdb-wl.el (bbdb-wl-get-update-record): Use
index 1d9c63a..115ea72 100644 (file)
@@ -5784,6 +5784,8 @@ OK \e$B$G$9!#\e(B
 ;; @r{\e$B<+F0E*$K\e(B ML \e$B%U%#!<%k%I$r2C$($k\e(B}
 (add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook)
 (setq bbdb-auto-notes-alist '(("X-ML-Name" (".*$" ML 0))))
+;; @r{\e$B<+F0<}=8$9$k%U%)%k%@$N@55,I=8=\e(B}
+(setq bbdb-wl-folder-regexp "^%\\|^-")
 @end group
 @end lisp
 
index 8dff6d0..0ce09ba 100644 (file)
@@ -5850,6 +5850,8 @@ byte-compiled and installed.
 ;; @r{automatically add mailing list fields}
 (add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook)
 (setq bbdb-auto-notes-alist '(("X-ML-Name" (".*$" ML 0))))
+;; @r{folder regexp for auto collection}
+(setq bbdb-wl-folder-regexp "^%\\|^-")
 @end group
 @end lisp
 
index e0ef325..976c01b 100644 (file)
@@ -31,6 +31,7 @@
 (require 'bbdb)
 
 (defvar bbdb-wl-get-update-record-hook nil)
+(defvar bbdb-wl-folder-regexp nil)
 
 (defun bbdb-wl-setup ()
   (add-hook 'wl-message-redisplay-hook 'bbdb-wl-get-update-record)
   (bbdb-save-db t))
 
 (defun bbdb-wl-get-update-record ()
-  (with-current-buffer (wl-message-get-original-buffer)
-    (bbdb-wl-update-record)
-    (run-hooks 'bbdb-wl-get-update-record-hook)))
+  (if (or (null bbdb-wl-folder-regexp)
+         (string-match
+          bbdb-wl-folder-regexp
+          (with-current-buffer
+              wl-message-buffer-cur-summary-buffer
+            wl-summary-buffer-folder-name)))
+      (with-current-buffer (wl-message-get-original-buffer)
+       (bbdb-wl-update-record)
+       (run-hooks 'bbdb-wl-get-update-record-hook))))
 
 (defun bbdb-wl-hide-bbdb-buffer ()
   (let (bbdb-buf bbdb-win)