* elmo-pipe.el (elmo-message-set-cached): Define.
(elmo-find-fetch-strategy): Ditto.
* elmo-multi.el (elmo-message-set-cached): Define.
(elmo-find-fetch-strategy): Rewrite.
* elmo-mime.el (elmo-mime-message-display): Use elmo-message-entity.
2003-08-01 Yuuichi Teranishi <teranisi@gohome.org>
+ * elmo.el (elmo-message-set-cached): Define as a method.
+
+ * elmo-pipe.el (elmo-message-set-cached): Define.
+ (elmo-find-fetch-strategy): Ditto.
+
+ * elmo-multi.el (elmo-message-set-cached): Define.
+ (elmo-find-fetch-strategy): Rewrite.
+
+ * elmo-mime.el (elmo-mime-message-display): Use elmo-message-entity.
+
* elmo-pipe.el (elmo-message-folder): Fixed definition.
2003-07-30 Yuuichi Teranishi <teranisi@gohome.org>
(let (mime-display-header-hook ; Do nothing.
(elmo-message-displaying t)
entity strategy)
- (setq entity (elmo-msgdb-overview-get-entity number
- (elmo-folder-msgdb
- folder)))
+ (setq entity (elmo-message-entity folder number))
(setq strategy (elmo-find-fetch-strategy folder entity
ignore-cache))
(mime-display-message
(nth (- (/ number (elmo-multi-folder-divide-number-internal folder)) 1)
(elmo-multi-folder-children-internal folder)))
+(luna-define-method elmo-message-set-cached ((folder elmo-multi-folder)
+ number cached)
+ (let ((pair (elmo-multi-real-folder-number folder number)))
+ (elmo-message-set-cached (car pair) (cdr pair) cached)))
+
+(luna-define-method elmo-find-fetch-strategy
+ ((folder elmo-multi-folder) entity &optional ignore-cache)
+ (let ((pair (elmo-multi-real-folder-number
+ folder
+ (elmo-message-entity-number entity))))
+ (elmo-find-fetch-strategy
+ (car pair)
+ (elmo-message-entity (car pair) (cdr pair)) ignore-cache)))
+
(luna-define-method elmo-message-entity ((folder elmo-multi-folder) key)
(cond
((numberp key)
(dolist (child (elmo-multi-folder-children-internal folder))
(elmo-folder-process-crosspost child)))
-(defsubst elmo-multi-find-fetch-strategy (folder entity ignore-cache)
- (if entity
- (let ((pair (elmo-multi-real-folder-number
- folder
- (elmo-msgdb-overview-entity-get-number entity)))
- (new-entity (elmo-msgdb-copy-overview-entity entity)))
- (setq new-entity
- (elmo-msgdb-overview-entity-set-number new-entity (cdr pair)))
- (elmo-find-fetch-strategy (car pair) new-entity ignore-cache))
- (elmo-make-fetch-strategy 'entire)))
-
-(luna-define-method elmo-find-fetch-strategy
- ((folder elmo-multi-folder)
- entity &optional ignore-cache)
- (elmo-multi-find-fetch-strategy folder entity ignore-cache))
-
(luna-define-method elmo-message-fetch ((folder elmo-multi-folder)
number strategy
&optional section outbuf unseen)
number
field))
+(luna-define-method elmo-message-set-cached ((folder elmo-pipe-folder)
+ number cached)
+ (elmo-message-set-cached (elmo-pipe-folder-dst-internal folder)
+ number cached))
+
+(luna-define-method elmo-find-fetch-strategy
+ ((folder elmo-pipe-folder) entity &optional ignore-cache)
+ (elmo-find-fetch-strategy (elmo-pipe-folder-dst-internal folder)
+ (elmo-message-entity
+ (elmo-pipe-folder-dst-internal folder)
+ (elmo-message-entity-number entity))
+ ignore-cache))
+
(luna-define-method elmo-message-entity ((folder elmo-pipe-folder) key)
(elmo-message-entity (elmo-pipe-folder-dst-internal folder) key))
(elmo-folder-local-p folder)
(elmo-msgdb-get-cached (elmo-folder-msgdb folder) number)))
-(defun elmo-message-set-cached (folder number cached)
+(luna-define-generic elmo-message-set-cached (folder number cached)
"Set cache status of the message in the msgdb.
FOLDER is the ELMO folder structure.
NUMBER is a number of the message.
-If CACHED is t, message is set as cached."
+If CACHED is t, message is set as cached.")
+
+(luna-define-method elmo-message-set-cached ((folder elmo-folder)
+ number cached)
(when (elmo-msgdb-set-cached (elmo-folder-msgdb folder)
number
cached