From: bg66 Date: Wed, 29 Nov 2006 07:32:23 +0000 (+0000) Subject: * sb-mixi.el (shimbun-comment-article): Cache the content of all X-Git-Tag: mixi-el-1_0_0~183 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8ce30f21d2ee7ee67050927cf57fc2766ef32feb;p=elisp%2Fmixi.git * sb-mixi.el (shimbun-comment-article): Cache the content of all comment. --- diff --git a/ChangeLog b/ChangeLog index bb1a7f4..157b1ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-11-29 OHASHI Akira + * sb-mixi.el (shimbun-comment-article): Cache the content of all + comment. + +2006-11-29 OHASHI Akira + * sb-mixi.el (shimbun-mixi): Add the COMMENT-CACHE slot. (initialize-instance): New method. (shimbun-mixi-get-headers): Cache the content of comment. diff --git a/sb-mixi.el b/sb-mixi.el index 5b16ba8..dffac84 100644 --- a/sb-mixi.el +++ b/sb-mixi.el @@ -203,19 +203,20 @@ FUNCTION is the function for getting articles." (shimbun-mixi-comment-cache-internal shimbun)))) (if (stringp cache) cache - (catch 'found + (let (article) (mapc (lambda (comment) (let ((id (mixi-friend-id (mixi-comment-owner comment))) - (time (shimbun-mixi-make-date comment))) + (time (shimbun-mixi-make-date comment)) + ;; FIXME: Concat parent's information? + (content (mixi-comment-content comment))) + (puthash (shimbun-mixi-make-message-id comment) content + (shimbun-mixi-comment-cache-internal shimbun)) (when (and (string= time date) (string-match (concat "^<[0-9]+\\." id "@") message-id)) - ;; FIXME: Concat parent's information? - (let ((content (mixi-comment-content comment))) - (puthash message-id content - (shimbun-mixi-comment-cache-internal shimbun)) - (throw 'found content))))) - (mixi-get-comments parent)))))) + (setq article content)))) + (mixi-get-comments parent)) + article)))) (luna-define-method shimbun-article ((shimbun shimbun-mixi) header &optional outbuf)