From: teranisi Date: Thu, 5 Apr 2001 03:31:47 +0000 (+0000) Subject: * elmo-shimbun.el (elmo-shimbun-folder): Added `header-hash' slot. X-Git-Tag: wl-2_6-root^3~60 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=99c5609d835cbf12d183b9ac8d282e222685c12d;p=elisp%2Fwanderlust.git * elmo-shimbun.el (elmo-shimbun-folder): Added `header-hash' slot. (elmo-folder-open-internal): Setup `header-hash' slot. (elmo-shimbun-msgdb-create-entity): Use `header-hash' to get header information. (elmo-map-message-fetch): Ditto. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 34b4224..57cca10 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2001-04-05 Yuuichi Teranishi + + * elmo-shimbun.el (elmo-shimbun-folder): Added `header-hash' slot. + (elmo-folder-open-internal): Setup `header-hash' slot. + (elmo-shimbun-msgdb-create-entity): Use `header-hash' to get header + information. + (elmo-map-message-fetch): Ditto. + 2001-04-04 Yuuichi Teranishi * shimbun.el, sb-airs.el, sb-asahi.el, sb-bbdb-ml.el, sb-cnet.el, diff --git a/elmo/elmo-shimbun.el b/elmo/elmo-shimbun.el index 4205907..424a254 100644 --- a/elmo/elmo-shimbun.el +++ b/elmo/elmo-shimbun.el @@ -34,7 +34,7 @@ (eval-and-compile (luna-define-class elmo-shimbun-folder - (elmo-map-folder) (shimbun group)) + (elmo-map-folder) (shimbun header-hash group)) (luna-define-internal-accessors 'elmo-shimbun-folder)) (luna-define-method elmo-folder-initialize ((folder @@ -55,12 +55,24 @@ elmo-shimbun-folder)) (shimbun-open-group (elmo-shimbun-folder-shimbun-internal folder) - (elmo-shimbun-folder-group-internal folder))) + (elmo-shimbun-folder-group-internal folder)) + (elmo-shimbun-folder-set-header-hash-internal + folder + (elmo-make-hash (length (shimbun-headers + (elmo-shimbun-folder-shimbun-internal folder))))) + ;; Set up header hash. + (dolist (header (shimbun-headers (elmo-shimbun-folder-shimbun-internal + folder))) + (elmo-set-hash-val + (shimbun-header-id header) header + (elmo-shimbun-folder-header-hash-internal folder)))) (luna-define-method elmo-folder-close-internal :after ((folder - elmo-shimbun-folder)) + elmo-shimbun-folder)) (shimbun-close-group - (elmo-shimbun-folder-shimbun-internal folder))) + (elmo-shimbun-folder-shimbun-internal folder)) + (elmo-shimbun-folder-set-header-hash-internal + folder nil)) (luna-define-method elmo-folder-check :after ((folder elmo-shimbun-folder)) (shimbun-close-group @@ -81,9 +93,9 @@ (defun elmo-shimbun-msgdb-create-entity (folder number) (with-temp-buffer (shimbun-header-insert - (shimbun-header - (elmo-shimbun-folder-shimbun-internal folder) - (elmo-map-message-location folder number))) + (elmo-get-hash-val + (elmo-map-message-location folder number) + (elmo-shimbun-folder-header-hash-internal folder))) (elmo-msgdb-create-overview-from-buffer number))) (luna-define-method elmo-folder-msgdb-create ((folder elmo-shimbun-folder) @@ -140,11 +152,15 @@ (with-current-buffer outbuf (erase-buffer) (shimbun-article (elmo-shimbun-folder-shimbun-internal folder) - location) + (elmo-get-hash-val + location + (elmo-shimbun-folder-header-hash-internal folder))) t) (with-temp-buffer (shimbun-article (elmo-shimbun-folder-shimbun-internal folder) - location) + (elmo-get-hash-val + location + (elmo-shimbun-folder-header-hash-internal folder))) (buffer-string)))) (luna-define-method elmo-map-folder-list-message-locations