* elmo-imap4.el (elmo-imap4-search-internal-primitive): Fixed
authorteranisi <teranisi>
Mon, 17 Dec 2001 03:21:57 +0000 (03:21 +0000)
committerteranisi <teranisi>
Mon, 17 Dec 2001 03:21:57 +0000 (03:21 +0000)
test for while loop to execute at least one SEARCH command.

elmo/ChangeLog
elmo/elmo-imap4.el

index 25c4508..73d40a0 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-17  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-imap4.el (elmo-imap4-search-internal-primitive): Fixed
+       test for while loop to execute at least one SEARCH command.
+
 2001-12-15  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-version.el (elmo-version): Up to 2.8.0.
index b67e25b..4d5bf6a 100644 (file)
@@ -2071,7 +2071,7 @@ If optional argument REMOVE is non-nil, remove FLAG."
        (imap-search-keys '("bcc" "body" "cc" "from" "subject" "to"))
        (total 0)
        (length (length from-msgs))
-       charset set-list results)
+       charset set-list end results)
     (message "Searching...")
     (cond
      ((string= "last" search-key)
@@ -2091,8 +2091,9 @@ If optional argument REMOVE is non-nil, remove FLAG."
       (setq search-key (concat "sent" search-key)
            set-list (elmo-imap4-make-number-set-list
                      from-msgs
-                     elmo-imap4-number-set-chop-length))
-      (while set-list
+                     elmo-imap4-number-set-chop-length)
+           end nil)
+      (while (not end)
        (setq results
              (append
               results
@@ -2122,7 +2123,8 @@ If optional argument REMOVE is non-nil, remove FLAG."
          (elmo-display-progress
           'elmo-imap4-search "Searching..."
           (/ (* total 100) length)))
-       (setq set-list (cdr set-list)))
+       (setq set-list (cdr set-list)
+             end (null set-list)))
       results)
      (t
       (setq charset
@@ -2132,8 +2134,9 @@ If optional argument REMOVE is non-nil, remove FLAG."
               (elmo-filter-value filter)))
            set-list (elmo-imap4-make-number-set-list
                      from-msgs
-                     elmo-imap4-number-set-chop-length))
-      (while set-list
+                     elmo-imap4-number-set-chop-length)
+           end nil)
+      (while (not end)
        (setq results
              (append
               results
@@ -2172,7 +2175,8 @@ If optional argument REMOVE is non-nil, remove FLAG."
          (elmo-display-progress
           'elmo-imap4-search "Searching..."
           (/ (* total 100) length)))
-       (setq set-list (cdr set-list)))
+       (setq set-list (cdr set-list)
+             end (null set-list)))
       results))))
 
 (defun elmo-imap4-search-internal (folder session condition from-msgs)