From: teranisi Date: Wed, 4 Oct 2000 08:39:13 +0000 (+0000) Subject: * elmo-nntp.el (elmo-nntp-max-of-folder): Fixed. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=451cbc5864a729a0b342eb09f39fc4e02d53a2d5;p=elisp%2Fwanderlust.git * elmo-nntp.el (elmo-nntp-max-of-folder): Fixed. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index c8ff3c0..2f218ab 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,7 @@ 2000-10-04 Yuuichi Teranishi + * elmo-nntp.el (elmo-nntp-max-of-folder): Fixed. + * elmo-util.el (elmo-number-set-member): New function. (elmo-number-set-append-list): Ditto. (elmo-number-set-append): Ditto. diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index f27bac4..aa51b0d 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -530,20 +530,10 @@ Don't cache if nil.") (if entry (progn (setq end-num (nth 2 entry)) - (when (and killed-list elmo-use-killed-list) - (setq killed-list (nreverse (sort killed-list '<))) - (cond - ;; XXX biggest number in server is killed, - ;; so max number is unknown (treated as no unsync). - ((eq end-num (car killed-list)) - (setq end-num nil)) - ;; killed number is obsolete. - ((< end-num (car killed-list)) - (while killed-list - (when (>= end-num (car killed-list)) - (elmo-msgdb-killed-list-save dir killed-list) - (setq killed-list nil)) - (setq killed-list (cdr killed-list)))))) + (when (and killed-list elmo-use-killed-list + (elmo-number-set-member end-num killed-list)) + ;; Max is killed. + (setq end-num nil)) (cons end-num (car entry))) (error "No such newsgroup \"%s\"" fld))) (let* ((connection (elmo-nntp-get-connection server user port type)) @@ -566,20 +556,10 @@ Don't cache if nil.") (elmo-match-string 3 response))) (setq e-num (string-to-int (elmo-match-string 1 response))) - (when (and killed-list elmo-use-killed-list) - (setq killed-list (nreverse (sort killed-list '<))) - (cond - ;; XXX biggest number in server is killed, - ;; so max number is unknown (treated as no unsync). - ((eq end-num (car killed-list)) - (setq end-num nil)) - ;; killed number is obsolete. - ((< end-num (car killed-list)) - (while killed-list - (when (>= end-num (car killed-list)) - (elmo-msgdb-killed-list-save dir killed-list) - (setq killed-list nil)) - (setq killed-list (cdr killed-list)))))) + (when (and killed-list elmo-use-killed-list + (elmo-number-set-member end-num killed-list)) + ;; Max is killed. + (setq end-num nil)) (cons end-num e-num)) (if (null response) (error "Selecting newsgroup \"%s\" failed" folder)