From 52da885e612f9262febf76ae0aef1d58e83519d1 Mon Sep 17 00:00:00 2001 From: hmurata Date: Wed, 17 Dec 2003 00:35:30 +0000 Subject: [PATCH] * modb-standard.el (modb-standard-message-entity): New function. (elmo-msgdb-message-entity): Use it. --- elmo/ChangeLog | 5 +++++ elmo/modb-standard.el | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 664cab6..a8037d1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2003-12-17 Hiroya Murata + + * modb-standard.el (modb-standard-message-entity): New function. + (elmo-msgdb-message-entity): Use it. + 2003-12-14 Hiroya Murata * elmo-internal.el (elmo-folder-list-subfolders): Rewrite; Fixed diff --git a/elmo/modb-standard.el b/elmo/modb-standard.el index 632c132..9e3f426 100644 --- a/elmo/modb-standard.el +++ b/elmo/modb-standard.el @@ -482,24 +482,27 @@ (message "Sorting...done") msgdb)) -(luna-define-method elmo-msgdb-message-entity ((msgdb modb-standard) key) - (let ((ret (and key - (elmo-get-hash-val - (cond ((stringp key) key) - ((numberp key) (modb-standard-key key))) - (modb-standard-entity-map-internal msgdb))))) - (if (eq 'autoload (car-safe ret)) +(defun modb-standard-message-entity (msgdb key load) + (let ((ret (elmo-get-hash-val + key + (modb-standard-entity-map-internal msgdb)))) + (if (and (eq 'autoload (car-safe ret)) load) (when modb-standard-divide-number (modb-standard-load-entity msgdb (elmo-msgdb-location msgdb) (/ (nth 1 ret) modb-standard-divide-number)) - (elmo-get-hash-val - (cond ((stringp key) key) - ((numberp key) (modb-standard-key key))) - (modb-standard-entity-map-internal msgdb))) + (modb-standard-message-entity msgdb key nil)) ret))) +(luna-define-method elmo-msgdb-message-entity ((msgdb modb-standard) key) + (when key + (modb-standard-message-entity + msgdb + (cond ((stringp key) key) + ((numberp key) (modb-standard-key key))) + 'autoload))) + (require 'product) (product-provide (provide 'modb-standard) (require 'elmo-version)) -- 1.7.10.4