From b12b74dbbc703878cd2f611c723c9a8044e6e54e Mon Sep 17 00:00:00 2001 From: hmurata Date: Thu, 26 Sep 2002 00:07:33 +0000 Subject: [PATCH] * 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. --- elmo/ChangeLog | 9 +++++++++ elmo/elmo-msgdb.el | 10 ++++++---- elmo/elmo.el | 6 ++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 3bd8cbe..58e953d 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,12 @@ +2002-09-26 Hiroya Murata + + * 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 * elmo-msgdb.el (elmo-msgdb-set-cached): Set mark-modified slot. diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index bca16e6..ab844ab 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -116,10 +116,13 @@ if MARK is nil, mark is removed." (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) @@ -145,8 +148,7 @@ if MARK is nil, mark is removed." (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. diff --git a/elmo/elmo.el b/elmo/elmo.el index 117184c..5f92ec8 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1117,8 +1117,10 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).") 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. -- 1.7.10.4