From 9ae635c14d52cf04bd209bd613ef3143398508af Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 26 Dec 2000 05:49:05 +0000 Subject: [PATCH] * elmo-imap4.el (elmo-imap4-msgdb-create): Set `elmo-imap4-fetch-callback-data' as a cons cell of `args' and result of `elmo-imap4-use-flag-p'. (elmo-imap4-fetch-callback-1): Set mark according to the result of `elmo-imap4-use-flag-p'. --- elmo/ChangeLog | 8 ++++++++ elmo/elmo-imap4.el | 22 ++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 917fe49..e72dbe6 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2000-12-26 Yuuichi Teranishi + + * elmo-imap4.el (elmo-imap4-msgdb-create): Set + `elmo-imap4-fetch-callback-data' as a cons cell of `args' + and result of `elmo-imap4-use-flag-p'. + (elmo-imap4-fetch-callback-1): Set mark according to + the result of `elmo-imap4-use-flag-p'. + 2000-12-22 Yuuichi Teranishi * elmo-msgdb.el (elmo-generic-folder-diff): Moved from elmo2.el diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index a02f91a..24a290b 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1040,20 +1040,28 @@ If optional argument UNMARK is non-nil, unmark." ;; ;; app-data: +;; cons of list ;; 0: new-mark 1: already-mark 2: seen-mark 3: important-mark -;; 4: seen-list 5: as-number +;; 4: seen-list +;; and result of use-flag-p. (defun elmo-imap4-fetch-callback-1 (entity flags app-data) "A msgdb entity callback function." - (let ((seen (member (car entity) (nth 4 app-data))) - mark) + (let* ((use-flag (cdr app-data)) + (app-data (car app-data)) + (seen (member (car entity) (nth 4 app-data))) + mark) (if (member "\\Flagged" flags) (elmo-msgdb-global-mark-set (car entity) (nth 3 app-data))) (setq mark (or (elmo-msgdb-global-mark-get (car entity)) (if (elmo-cache-exists-p (car entity)) ;; XXX - (if (or (member "\\Seen" flags) seen) + (if (or seen + (and use-flag + (member "\\Seen" flags))) nil (nth 1 app-data)) - (if (or (member "\\Seen" flags) seen) + (if (or seen + (and use-flag + (member "\\Seen" flags))) (if elmo-imap4-use-cache (nth 2 app-data)) (nth 0 app-data))))) @@ -1093,7 +1101,9 @@ If optional argument UNMARK is non-nil, unmark." (with-current-buffer (elmo-network-session-buffer session) (setq elmo-imap4-current-msgdb nil elmo-imap4-fetch-callback 'elmo-imap4-fetch-callback-1 - elmo-imap4-fetch-callback-data args) + elmo-imap4-fetch-callback-data (cons args + (elmo-imap4-use-flag-p + spec))) (while set-list (elmo-imap4-send-command-wait session -- 1.7.10.4