From: teranisi Date: Mon, 16 Sep 2002 12:48:14 +0000 (+0000) Subject: * wl-summary.el (wl-summary-sync-marks): Treat global-mark here. X-Git-Tag: elmo-mark-restart~145 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e19a0fca3af5f9dd3287226596d918a836ae611e;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-sync-marks): Treat global-mark here. * elmo-filter.el (elmo-filter-folder-list-importants): Don't treat global-mark. * elmo.el (elmo-folder-list-importants): Ditto. * elmo-net.el (elmo-folder-list-importants): Ditto. * elmo-map.el (elmo-folder-list-importants): Ditto. * elmo-msgdb.el (elmo-msgdb-mark): New inline function. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index c48d0af..629470c 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,7 +1,16 @@ 2002-09-16 Yuuichi Teranishi + * elmo-msgdb.el (elmo-msgdb-mark): New inline function. + * elmo-filter.el (elmo-folder-msgdb-create): Call target-folder's method if msgdb is not required. + (elmo-filter-folder-list-importants): Don't treat global-mark. + + * elmo.el (elmo-folder-list-importants): Ditto. + + * elmo-net.el (elmo-folder-list-importants): Ditto. + + * elmo-map.el (elmo-folder-list-importants): Ditto. * elmo-msgdb.el (elmo-msgdb-seen-list): Use `elmo-msgdb-unread-marks' diff --git a/elmo/elmo-filter.el b/elmo/elmo-filter.el index 7f0ca91..b0696d3 100644 --- a/elmo/elmo-filter.el +++ b/elmo/elmo-filter.el @@ -179,14 +179,10 @@ (elmo-filter-folder-list-unreads folder)) (defsubst elmo-filter-folder-list-importants (folder) - (elmo-uniq-list - (nconc - (elmo-list-filter - (elmo-folder-list-messages folder nil 'in-msgdb) - (elmo-folder-list-importants - (elmo-filter-folder-target-internal folder))) - (elmo-folder-list-messages-with-global-mark - folder elmo-msgdb-important-mark)))) + (elmo-list-filter + (elmo-folder-list-messages folder nil 'in-msgdb) + (elmo-folder-list-importants + (elmo-filter-folder-target-internal folder)))) (luna-define-method elmo-folder-list-importants ((folder elmo-filter-folder)) (elmo-filter-folder-list-importants folder)) diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index 69ab1c9..1fb8a36 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -301,10 +301,7 @@ (luna-define-method elmo-folder-list-importants ((folder elmo-map-folder)) (let ((locations (elmo-map-folder-list-importants folder))) (if (listp locations) - (elmo-uniq-list - (nconc (elmo-map-folder-locations-to-numbers folder locations) - (elmo-folder-list-messages-with-global-mark - folder elmo-msgdb-important-mark))) + (elmo-map-folder-locations-to-numbers folder locations) (luna-call-next-method)))) (luna-define-method elmo-folder-delete-messages ((folder elmo-map-folder) diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index 5a46850..f449a3f 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -586,6 +586,19 @@ header separator." (setcar (cdr entity) after)) (setq mark-alist (cdr mark-alist))))) +(defsubst elmo-msgdb-mark (status cached) + (case status + (unread + (if cached + elmo-msgdb-unread-cached-mark + elmo-msgdb-unread-uncached-mark)) + (important + elmo-msgdb-important-mark) + (answered + (if cached + elmo-msgdb-answered-cached-mark + elmo-msgdb-answered-uncached-mark)))) + (defsubst elmo-msgdb-seen-save (dir obj) (elmo-object-save (expand-file-name elmo-msgdb-seen-filename dir) diff --git a/elmo/elmo-net.el b/elmo/elmo-net.el index 1b824fe..51d70e6 100644 --- a/elmo/elmo-net.el +++ b/elmo/elmo-net.el @@ -404,11 +404,7 @@ Returned value is searched from `elmo-network-stream-type-alist'." elmo-net-folder)) (if (and (elmo-folder-plugged-p folder) (elmo-folder-use-flag-p folder)) - (elmo-uniq-list - (nconc - (elmo-folder-send folder 'elmo-folder-list-importants-plugged) - (elmo-folder-list-messages-with-global-mark - folder elmo-msgdb-important-mark))) + (elmo-folder-send folder 'elmo-folder-list-importants-plugged) (luna-call-next-method))) (luna-define-method elmo-folder-list-answereds :around ((folder diff --git a/elmo/elmo.el b/elmo/elmo.el index 34279bc..50f31d8 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -256,13 +256,9 @@ If second optional IN-MSGDB is non-nil, only messages in the msgdb are listed." msgs)) (luna-define-method elmo-folder-list-importants ((folder elmo-folder)) - (elmo-uniq-list - (nconc - (elmo-folder-list-messages-with-global-mark folder - elmo-msgdb-important-mark) - (elmo-folder-list-messages-mark-match folder - (regexp-quote - elmo-msgdb-important-mark))))) + (elmo-folder-list-messages-mark-match folder + (regexp-quote + elmo-msgdb-important-mark))) (luna-define-method elmo-folder-list-answereds ((folder elmo-folder)) (delq nil @@ -332,11 +328,11 @@ CONDITION is a condition structure for testing. NUMBERS is a list of message numbers, use to be test for \"last\" and \"first\" predicates.") -(luna-define-generic elmo-folder-msgdb-create (folder numbers seen-list) +(luna-define-generic elmo-folder-msgdb-create (folder numbers id-mark-table) "Create a message database (implemented in each backends). FOLDER is the ELMO folder structure. NUMBERS is a list of message numbers to create msgdb. -SEEN-LIST is a list of message-id string which should be treated as read.") +ID-MARK-TABLE is a hashtable of message-id and its status mark.") (luna-define-generic elmo-folder-unmark-important (folder numbers) "Un-mark messages as important. diff --git a/wl/ChangeLog b/wl/ChangeLog index 9906b80..05fa25f 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,7 @@ 2002-09-16 Yuuichi Teranishi + * wl-summary.el (wl-summary-sync-marks): Treat global-mark here. + * wl-version.el (wl-version): Set codename for `elmo-mark' branch. 2002-09-13 Yuuichi Teranishi diff --git a/wl/wl-summary.el b/wl/wl-summary.el index de78174..c0aa7d0 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1916,8 +1916,13 @@ If ARG is non-nil, checking is omitted." unreads-in-db (elmo-folder-list-messages-mark-match wl-summary-buffer-elmo-folder (wl-regexp-opt (elmo-msgdb-unread-marks))) - importants (elmo-folder-list-importants - wl-summary-buffer-elmo-folder) + importants (elmo-uniq-list + (nconc + (elmo-folder-list-importants + wl-summary-buffer-elmo-folder) + (elmo-folder-list-messages-with-global-mark + wl-summary-buffer-elmo-folder + elmo-msgdb-important-mark))) unreads (elmo-folder-list-unreads wl-summary-buffer-elmo-folder)) (setq diff (elmo-list-diff importants importants-in-db))