+2001-02-09 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo2.el (elmo-buffer-cache-message): Call `elmo-read-msg' with
+ argument `unread' as non-nil.
+ (elmo-read-msg-with-cache): Added argument `unread'.
+ (elmo-read-msg-no-cache): Ditto.
+ (elmo-read-msg): Ditto.
+
2001-02-07 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-pipe.el (elmo-pipe-drain): Bind `elmo-inhibit-read-cache' as t
(elmo-msgdb-rename-path old-folder new-folder))
(elmo-dop-rename-folder old-folder new-folder)))))
-(defun elmo-read-msg-no-cache (folder msg outbuf)
+(defun elmo-read-msg-no-cache (folder msg outbuf &optional unread)
"Read messsage specified by FOLDER and MSG(number) into OUTBUF
-without cacheing."
- (elmo-call-func folder "read-msg" msg outbuf))
+without cacheing.
+If optional UNREAD is non-nil, message is keeped as unread."
+ (elmo-call-func folder "read-msg" msg outbuf unread))
(defun elmo-force-cache-msg (folder number msgid &optional loc-alist)
"Force cache message."
;; elmo-read-msg (folder msg outbuf msgdb)
;;; read message
-(defun elmo-read-msg (folder msg outbuf msgdb &optional force-reload)
+(defun elmo-read-msg (folder msg outbuf msgdb &optional force-reload unread)
"Read message into outbuf."
(let ((inhibit-read-only t))
(if elmo-inhibit-read-cache
;;Only use elmo-read-msg-with-cache, because if folder is network and
;;elmo-use-cache-p is nil, cannot read important msg. (by muse)
;;(if (not (elmo-use-cache-p folder msg))
- (elmo-read-msg-no-cache folder msg outbuf)
- (elmo-read-msg-with-cache folder msg outbuf msgdb force-reload))))
+ (elmo-read-msg-no-cache folder msg outbuf unread)
+ (elmo-read-msg-with-cache folder msg outbuf msgdb force-reload unread))))
(defun elmo-read-msg-with-cache (folder msg outbuf msgdb
- &optional force-reload)
+ &optional force-reload unread)
"Read message into outbuf with cacheing."
(let* ((number-alist (elmo-msgdb-get-number-alist
(or msgdb (elmo-msgdb-load folder))))
folder msg))
(if (setq ret-val (elmo-call-func (car real-fld-num)
"read-msg"
- (cdr real-fld-num) outbuf))
+ (cdr real-fld-num) outbuf unread))
(if (and message-id
(not (elmo-local-file-p folder msg))
(elmo-use-cache-p folder msg))
(set-buffer hit)
(elmo-read-msg fld msg
(current-buffer)
- msgdb force-reload))
+ msgdb force-reload 'unread))
(quit
(elmo-buffer-cache-delete)
(error "read message %s/%s is quitted" fld msg))