* elmo-cache.el (elmo-cache-search-all): Added argument `from-msgs'.
authorteranisi <teranisi>
Fri, 29 Sep 2000 03:36:10 +0000 (03:36 +0000)
committerteranisi <teranisi>
Fri, 29 Sep 2000 03:36:10 +0000 (03:36 +0000)
elmo/ChangeLog
elmo/elmo-cache.el

index 6a74f79..ef18217 100644 (file)
@@ -1,5 +1,7 @@
 2000-09-29  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * elmo-cache.el (elmo-cache-search-all): Added argument `from-msgs'.
+
        * elmo2.el (elmo-generic-list-folder-unread): Rewrite.
        (elmo-list-folder-unread): Rewrite.
        (elmo-list-folder-important): Ditto.
index 4f81749..9c4e9f2 100644 (file)
@@ -280,10 +280,10 @@ If KBYTES is kilo bytes (This value must be float)."
                ;; not directory.
                path))))))
 
-(defun elmo-cache-search-all (folder condition)
+(defun elmo-cache-search-all (folder condition from-msgs)
   (let* ((number-alist (elmo-msgdb-number-load
                        (elmo-msgdb-expand-path folder)))
-        (number-list (mapcar 'car number-alist))
+        (number-list (or from-msgs (mapcar 'car number-alist)))
         (num (length number-alist))
         cache-file
         ret-val
@@ -291,7 +291,8 @@ If KBYTES is kilo bytes (This value must be float)."
         percent i)
     (setq i 0)
     (while number-alist
-      (if (and (setq cache-file (elmo-cache-exists-p (cdr (car
+      (if (and (memq (car (car number-alist)) number-list)
+              (setq cache-file (elmo-cache-exists-p (cdr (car
                                                           number-alist))
                                                     folder
                                                     (car (car