+2002-09-26 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo.el (elmo-message-set-cached): Set mark-modified slot if
+ mark is changed.
+
+ * elmo-msgdb.el (elmo-msgdb-set-mark): Return t.
+ (elmo-msgdb-set-cached): Undo last change; return non-nil if mark
+ is changed.
+
2002-09-25 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-msgdb.el (elmo-msgdb-set-cached): Set mark-modified slot.
(elmo-msgdb-get-mark-alist msgdb)
(list (setq elem (list number mark)))))
(elmo-set-hash-val (format "#%d" number) elem
- (elmo-msgdb-get-mark-hashtb msgdb))))))
+ (elmo-msgdb-get-mark-hashtb msgdb))))
+ ;; return value.
+ t))
(defun elmo-msgdb-set-cached (msgdb number cached)
- "Set message cache status."
+ "Set message cache status.
+If mark is changed, return non-nil."
(let* ((cur-mark (elmo-msgdb-get-mark msgdb number))
(cur-status (cond
((string= cur-mark elmo-msgdb-important-mark)
(elmo-msgdb-set-mark msgdb number
(if cached
elmo-msgdb-unread-cached-mark
- elmo-msgdb-unread-uncached-mark))))
- (elmo-folder-set-mark-modified-internal folder t))))
+ elmo-msgdb-unread-uncached-mark)))))))
(defun elmo-msgdb-set-status (msgdb folder number status)
"Set message status.
FOLDER is the ELMO folder structure.
NUMBER is a number of the message.
If CACHED is t, message mark is set as cached."
- (elmo-msgdb-set-cached
- (elmo-folder-msgdb folder) number cached))
+ (when (elmo-msgdb-set-cached
+ (elmo-folder-msgdb folder) number cached)
+ (elmo-folder-set-mark-modified-internal folder t)))
+
(defun elmo-message-mark (folder number)
"Get mark of the message.