* wl-folder.el (wl-folder-buffer-search-group): Ignore non-group
authoryoichi <yoichi>
Sun, 16 Feb 2003 18:29:58 +0000 (18:29 +0000)
committeryoichi <yoichi>
Sun, 16 Feb 2003 18:29:58 +0000 (18:29 +0000)
folder.

wl/ChangeLog
wl/wl-folder.el

index 3d544c1..347eb7c 100644 (file)
@@ -1,5 +1,8 @@
 2003-02-17  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
 
+       * wl-folder.el (wl-folder-buffer-search-group): Ignore non-group
+       folder.
+
        * wl-vars.el (wl-delete-folder-alist): Add shimbun folder to
        the default value.
 
index 8500617..7f44857 100644 (file)
           (wl-match-buffer 1)))))
 
 (defun wl-folder-buffer-search-group (group)
-  (re-search-forward
-   (concat
-    "^\\([ \t]*\\)\\[[\\+-]\\]"
-    (regexp-quote group) ":[-0-9-]+/[0-9-]+/[0-9-]+") nil t))
+  (let ((prev-point (point))
+       (group-regexp (concat
+                      "^\\([ \t]*\\)\\[[\\+-]\\]"
+                      (regexp-quote group) ":[-0-9-]+/[0-9-]+/[0-9-]+")))
+    (or (catch 'found
+         (while (re-search-forward group-regexp nil t)
+           (if (wl-folder-buffer-group-p)
+               (throw 'found (point)))))
+       (progn ; not found
+         (goto-char prev-point)
+         nil))))
 
 (defun wl-folder-buffer-search-entity (folder &optional searchname)
   (let ((search (or searchname (wl-folder-get-petname folder)))
@@ -339,6 +346,10 @@ Default HASHTB is `wl-folder-elmo-folder-hashtb'."
             (wl-folder-elmo-folder-cache-put name folder)
             folder)))))
 
+(defsubst wl-folder-put-folder-property (beg end id is-group &optional object)
+  (put-text-property beg end 'wl-folder-entity-id id object)
+  (put-text-property beg end 'wl-folder-is-group is-group object))
+
 (defun wl-folder-prev-entity ()
   (interactive)
   (forward-line -1))
@@ -2989,10 +3000,6 @@ Call `wl-summary-write-current-folder' with current folder name."
          (try-completion string candidate)
        (all-completions string candidate))))))
 
-(defun wl-folder-put-folder-property (beg end id is-group &optional object)
-  (put-text-property beg end 'wl-folder-entity-id id object)
-  (put-text-property beg end 'wl-folder-is-group is-group object))
-
 (require 'product)
 (product-provide (provide 'wl-folder) (require 'wl-version))