From f8026fe8a1cf0761c90b33e63822ccdc3e7b84e2 Mon Sep 17 00:00:00 2001 From: okada Date: Sat, 17 Feb 2001 12:33:45 +0000 Subject: [PATCH] up --- elmo/ChangeLog | 5 +++++ elmo/elmo-imap4.el | 14 +++++++++----- elmo/elmo-msgdb.el | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f851331..e0edbdf 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,10 @@ 2000-02-17 Kenichi OKADA + * elmo-msgdb.el (elmo-msgdb-max-of-killed): New function. + * elmo-imap4.el (elmo-imap4-list-folder): Use killed-list. + +2000-02-17 Kenichi OKADA + * elmo-pop3.el (elmo-network-authenticate-session): Bind `sasl-mechanisms' 2001-02-16 Yuuichi Teranishi diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index aa0c58a..30954c8 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -750,11 +750,15 @@ Returns response value if selecting folder succeed. " 'search))) (defun elmo-imap4-list-folder (spec) - (let ((killed (and elmo-use-killed-list - (elmo-msgdb-killed-list-load - (elmo-msgdb-expand-path spec)))) - numbers) - (setq numbers (elmo-imap4-list spec "all")) + (let* ((killed (and elmo-use-killed-list + (elmo-msgdb-killed-list-load + (elmo-msgdb-expand-path spec)))) + (max (elmo-msgdb-max-of-killed killed)) + numbers) + (setq numbers (elmo-imap4-list spec + (if (null (eq max 0)) + (format "%d:*" (1+ max)) + "all"))) (elmo-living-messages numbers killed))) (defun elmo-imap4-list-folder-unread (spec number-alist mark-alist diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index b4cbcf4..47dcd3d 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -664,6 +664,20 @@ content of MSGDB is changed." (setq killed (cdr killed))) ret-val)) +(defun elmo-msgdb-max-of-killed (killed-list) + (let ((klist killed-list) + (max 0) + k) + (while (car klist) + (if (< max + (setq k + (if (consp (car klist)) + (cdar klist) + (car klist)))) + (setq max k)) + (setq klist (cdr klist))) + max)) + (defun elmo-living-messages (messages killed-list) (if killed-list (delq nil -- 1.7.10.4