* wl-folder.el (wl-folder-buffer-search-entity): Check real name.
authoryoichi <yoichi>
Thu, 23 Dec 2004 14:56:39 +0000 (14:56 +0000)
committeryoichi <yoichi>
Thu, 23 Dec 2004 14:56:39 +0000 (14:56 +0000)
wl/ChangeLog
wl/wl-folder.el

index c03ad3e..20e074c 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-23  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-folder.el (wl-folder-buffer-search-entity): Check real name.
+
 2004-12-22  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-vars.el (wl-smtp-authenticate-realm): New user option.
index d55bf97..3e9467b 100644 (file)
 
 (defun wl-folder-buffer-search-entity (folder &optional searchname)
   (let ((search (or searchname (wl-folder-get-petname folder)))
-       case-fold-search)
-    (re-search-forward
-     (concat
-      "^[ \t]*"
-      (regexp-quote search) ":[-0-9\\*-]+/[0-9\\*-]+/[0-9\\*-]+") nil t)))
+       case-fold-search
+       result)
+    (catch 'found
+      (while (setq result
+                  (re-search-forward
+                   (concat
+                    "^[ \t]*"
+                    (regexp-quote search) ":[-0-9\\*-]+/[0-9\\*-]+/[0-9\\*-]+")
+                   nil t))
+       (when (string= (wl-folder-get-entity-from-buffer) folder)
+         (throw 'found result))))))
 
 (defsubst wl-folder-get-folder-name-by-id (entity-id &optional hashtb)
   (and (numberp entity-id)