From e892c13f69f3fc397f84c74ab739c0f978f06356 Mon Sep 17 00:00:00 2001 From: teranisi Date: Mon, 21 Jul 2003 14:47:42 +0000 Subject: [PATCH] * wl-score.el (wl-score-get-latest-msgs): Don't use msgdb directly. (wl-summary-rescore): Ditto. --- wl/ChangeLog | 2 ++ wl/wl-score.el | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 0294ad5..c0b881d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -4,6 +4,8 @@ directly. (wl-score-overview-entity-get-lines): Ditto. (wl-score-overview-entity-get-xref): Ditto. + (wl-score-get-latest-msgs): Ditto. + (wl-summary-rescore): Ditto. * wl-summary.el (wl-summary-mode-map): Bind wl-summary-mark-as-answered to "&". diff --git a/wl/wl-score.el b/wl/wl-score.el index aeb8834..c7bd221 100644 --- a/wl/wl-score.el +++ b/wl/wl-score.el @@ -438,7 +438,7 @@ Set `wl-score-cache' nil." (while wl-scores-messages (when (or (/= wl-summary-default-score (cdar wl-scores-messages))) - (setq num (elmo-msgdb-overview-entity-get-number + (setq num (elmo-message-entity-number (caar wl-scores-messages)) score (cdar wl-scores-messages)) (if (setq entry (assq num wl-summary-scored)) @@ -921,22 +921,23 @@ Set `wl-score-cache' nil." (let* ((now (wl-day-number (current-time-string))) (expire (and wl-score-expiry-days (- now wl-score-expiry-days))) - (roverview (reverse (elmo-msgdb-get-overview - (wl-summary-buffer-msgdb)))) + (rnumbers (reverse wl-summary-buffer-number-list)) msgs) (if (not expire) (elmo-folder-list-messages wl-summary-buffer-elmo-folder nil t) - ;; XXX What's this? (catch 'break - (while roverview + (while rnumbers (if (< (wl-day-number - (elmo-msgdb-overview-entity-get-date (car roverview))) + (elmo-message-entity-field + (elmo-message-entity wl-summary-buffer-elmo-folder + (car rnumbers)) + 'date)) expire) (throw 'break t)) - (wl-push (elmo-msgdb-overview-entity-get-number (car roverview)) - msgs) - (setq roverview (cdr roverview)))) + + (wl-push (car rnumbers)) + (setq rnumbers (cdr rnumbers)))) msgs))) (defun wl-score-get-header (header &optional extra) @@ -1175,9 +1176,10 @@ Set `wl-score-cache' nil." (wl-score-save) (setq wl-score-cache nil) (setq wl-summary-scored nil) - (setq number-alist (elmo-msgdb-get-number-alist (wl-summary-buffer-msgdb))) (wl-summary-score-headers (unless arg - (wl-summary-rescore-msgs number-alist))) + (wl-summary-rescore-msgs + (elmo-folder-list-messages + wl-summary-buffer-elmo-folder t t)))) (setq expunged (wl-summary-score-update-all-lines t)) (if expunged (message "%d message(s) are expunged by scoring." (length expunged))) -- 1.7.10.4