From: teranisi Date: Fri, 19 Sep 2003 14:10:05 +0000 (+0000) Subject: * wl-summary.el (wl-summary-sync-marks): X-Git-Tag: wl-2_11_15~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=16625a0bed413d619bb9789da74ee1f9aea34120;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-sync-marks): Use elmo-folder-list-global-flag-messages. * elmo-flag.el (elmo-folder-list-global-flag-messages): New function. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a7cff0b..86592e5 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,7 @@ 2003-09-19 Yuuichi Teranishi + * 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. diff --git a/elmo/elmo-flag.el b/elmo/elmo-flag.el index 62590db..a093091 100644 --- a/elmo/elmo-flag.el +++ b/elmo/elmo-flag.el @@ -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) diff --git a/wl/ChangeLog b/wl/ChangeLog index 32b02ed..cbae831 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -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. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 6c3f1bc..b2a0f02 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -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))