+2002-09-25  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-msgdb.el (elmo-msgdb-set-cached): Set mark-modified slot.
+
 2002-09-24  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-msgdb.el (elmo-msgdb-unset-status): Set mark-modified slot.
 
                      ((not (member cur-mark (elmo-msgdb-unread-marks)))
                       'read)))
         (cur-cached (not (member cur-mark (elmo-msgdb-uncached-marks)))))
-    (unless (eq (not cached) (not cur-cached))
+    (unless (eq cached cur-cached)
       (case cur-status
        (read
         (elmo-msgdb-set-mark msgdb number
         (elmo-msgdb-set-mark msgdb number
                              (if cached
                                  elmo-msgdb-unread-cached-mark
-                               elmo-msgdb-unread-uncached-mark)))))))
+                               elmo-msgdb-unread-uncached-mark))))
+      (elmo-folder-set-mark-modified-internal folder t))))
 
 (defun elmo-msgdb-set-status (msgdb folder number status)
   "Set message status.