From 3830c7400d2f1ab3691f2a18e3ffba3590ac9443 Mon Sep 17 00:00:00 2001 From: teranisi Date: Mon, 17 Dec 2001 03:22:28 +0000 Subject: [PATCH] * elmo-imap4.el (elmo-imap4-search-internal-primitive): Fixed test for while loop to execute at least one SEARCH command. --- elmo/ChangeLog | 5 +++++ elmo/elmo-imap4.el | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 8962298..6ffc8dc 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2001-12-17 Yuuichi Teranishi + + * 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 * elmo-version.el (elmo-version): Up to 2.9.0. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index b67e25b..4d5bf6a 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -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) -- 1.7.10.4