From 08e424ca82c351c0d93f4b5e9f9c747bb0cb83d7 Mon Sep 17 00:00:00 2001 From: teranisi Date: Thu, 8 Feb 2001 21:50:11 +0000 Subject: [PATCH] * 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. --- elmo/ChangeLog | 8 ++++++++ elmo/elmo2.el | 19 ++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index e8fd972..cf4256c 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2001-02-09 Yuuichi Teranishi + + * 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 * elmo-pipe.el (elmo-pipe-drain): Bind `elmo-inhibit-read-cache' as t diff --git a/elmo/elmo2.el b/elmo/elmo2.el index e96b6bc..7bedb2c 100644 --- a/elmo/elmo2.el +++ b/elmo/elmo2.el @@ -134,10 +134,11 @@ (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." @@ -205,18 +206,18 @@ without cacheing." ;; 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)))) @@ -236,7 +237,7 @@ without cacheing." 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)) @@ -745,7 +746,7 @@ message list in msgdb. Otherwise, number-list is load from msgdb." (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)) -- 1.7.10.4