* wl-summary.el (wl-summary-sync-marks): Treat global-mark here.
authorteranisi <teranisi>
Mon, 16 Sep 2002 12:48:14 +0000 (12:48 +0000)
committerteranisi <teranisi>
Mon, 16 Sep 2002 12:48:14 +0000 (12:48 +0000)
* 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.

elmo/ChangeLog
elmo/elmo-filter.el
elmo/elmo-map.el
elmo/elmo-msgdb.el
elmo/elmo-net.el
elmo/elmo.el
wl/ChangeLog
wl/wl-summary.el

index c48d0af..629470c 100644 (file)
@@ -1,7 +1,16 @@
 2002-09-16  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * 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'
 
index 7f0ca91..b0696d3 100644 (file)
   (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))
index 69ab1c9..1fb8a36 100644 (file)
 (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)
index 5a46850..f449a3f 100644 (file)
@@ -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)
index 1b824fe..51d70e6 100644 (file)
@@ -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
index 34279bc..50f31d8 100644 (file)
@@ -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.
index 9906b80..05fa25f 100644 (file)
@@ -1,5 +1,7 @@
 2002-09-16  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * 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  <teranisi@gohome.org>
index de78174..c0aa7d0 100644 (file)
@@ -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))