* wl-summary.el (wl-summary-sync-marks):
authorteranisi <teranisi>
Fri, 19 Sep 2003 14:10:05 +0000 (14:10 +0000)
committerteranisi <teranisi>
Fri, 19 Sep 2003 14:10:05 +0000 (14:10 +0000)
Use elmo-folder-list-global-flag-messages.

* elmo-flag.el (elmo-folder-list-global-flag-messages): New function.

elmo/ChangeLog
elmo/elmo-flag.el
wl/ChangeLog
wl/wl-summary.el

index a7cff0b..86592e5 100644 (file)
@@ -1,5 +1,7 @@
 2003-09-19  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * elmo-flag.el (elmo-folder-list-global-flag-messages): New function.
+
        * elmo.el (elmo-folder-delete-messages): Added notice in docstring.
        (elmo-folder-move-messages): Call elmo-global-flag-detach-messages
        with argument `delete-if-none' when dst-folder is 'null.
index 62590db..a093091 100644 (file)
@@ -226,6 +226,19 @@ NUMBER is the number of the message."
       (setq flag-list (cdr flag-list)))
     matches))
 
+(defun elmo-folder-list-global-flag-messages (folder flag)
+  "List messages which have global flag.
+FOLDER is the elmo folder structure.
+FLAG is the symbol of the flag."
+  (when (elmo-global-flag-p flag)
+    (let ((flag-folder (elmo-flag-get-folder flag))
+         result entity)
+      (dolist (elem (elmo-flag-folder-minfo-internal flag-folder))
+       (if (setq entity (elmo-message-entity folder (nth 1 elem)))
+           (setq result (cons (elmo-message-entity-number entity)
+                              result))))
+      result)))
+
 ;;;
 ;; minfo is a list of following cell.
 ;; ((((FNAME . NUMBER)...(FNAME . NUMBER)) MESSAGE-ID NUMBER-IN-FLAG-FOLDER)
index 32b02ed..cbae831 100644 (file)
@@ -3,6 +3,7 @@
        * wl-summary.el (wl-summary-delete-all-msgs): Use
        elmo-folder-move-messages instead of elmo-folder-delete-messages
        and elmo-folder-detach-messages.
+       (wl-summary-sync-marks): Use elmo-folder-list-global-flag-messages.
 
        * wl-expire.el (wl-expire-delete): Ditto.
        (wl-expire-refile-with-copy-reserve-msg): Ditto.
index 6c3f1bc..b2a0f02 100644 (file)
@@ -1670,8 +1670,15 @@ If ARG is non-nil, checking is omitted."
                    wl-summary-buffer-elmo-folder)
                   'internal))
       (message "Updating marks...")
-      (setq importants (elmo-folder-list-importants
-                       wl-summary-buffer-elmo-folder)
+      (setq importants (elmo-uniq-list
+                       (nconc (elmo-folder-list-importants
+                               wl-summary-buffer-elmo-folder)
+                              ;; XXX Temporal implementation.
+                              ;; It should be merged to the
+                              ;; elmo-folder-list-flagged.
+                              (elmo-folder-list-global-flag-messages
+                               wl-summary-buffer-elmo-folder
+                               'important)))
            unreads (elmo-folder-list-unreads
                     wl-summary-buffer-elmo-folder)
            answereds (elmo-folder-list-answereds
@@ -4605,6 +4612,7 @@ If ASK-CODING is non-nil, coding-system for the message is asked."
          (wl-message-header-narrowing-toggle)
          (and wpos (set-window-start mwin wpos)))))))
 
+(autoload 'elmo-folder-list-global-flag-messages "elmo-flag")
 
 (require 'product)
 (product-provide (provide 'wl-summary) (require 'wl-version))