2009-05-26 Vitaly Mayatskikh <v.mayatskih@gmail.com>
authorokazaki <okazaki>
Thu, 20 Aug 2009 20:51:32 +0000 (20:51 +0000)
committerokazaki <okazaki>
Thu, 20 Aug 2009 20:51:32 +0000 (20:51 +0000)
* elmo-imap4.el (elmo-imap4-folder-list-flagged): Use elmo-imap4-list
(removed duplicated code)

elmo/ChangeLog
elmo/elmo-imap4.el

index 1057b61..7aa1cf6 100644 (file)
@@ -18,6 +18,9 @@
         * elmo-mime.el (elmo-mime-entity-display): Fix Emacs crash in
        mime-view when displaying malformed base64 attach.
 
+       * elmo-imap4.el (elmo-imap4-folder-list-flagged): Use elmo-imap4-list
+       (removed duplicated code)
+
        * modb-standard.el (modb-standard-cleanup-stale-entities): New
        function, Remove stale entities from elmo's cache.
 
index 0cc8e37..82e8dbf 100644 (file)
@@ -821,16 +821,7 @@ FLAG is one of the `unread', `read', `important', `answered', `any'."
   (let ((session (elmo-imap4-get-session folder))
        (criteria (elmo-imap4-flag-to-imap-criteria flag)))
     (if (elmo-imap4-session-flag-available-p session flag)
-       (progn
-         (elmo-imap4-session-select-mailbox
-          session
-          (elmo-imap4-folder-mailbox-internal folder))
-         (elmo-imap4-response-value
-          (elmo-imap4-send-command-wait
-           session
-           (format (if elmo-imap4-use-uid "uid search %s"
-                     "search %s") criteria))
-          'search))
+       (elmo-imap4-list folder criteria)
       ;; List flagged messages in the msgdb.
       (elmo-msgdb-list-flagged (elmo-folder-msgdb folder) flag))))