From: hmurata Date: Thu, 26 Sep 2002 00:07:33 +0000 (+0000) Subject: * elmo.el (elmo-message-set-cached): Set mark-modified slot if X-Git-Tag: elmo-mark-restart~117 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b12b74dbbc703878cd2f611c723c9a8044e6e54e;p=elisp%2Fwanderlust.git * 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. --- 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.