From 52f5dc03726ff31d785e092b2a0de5cc9c593e3f Mon Sep 17 00:00:00 2001 From: bg66 Date: Wed, 22 Nov 2006 05:14:04 +0000 Subject: [PATCH] * sb-mixi.el (shimbun-comment-article): Simplify. --- ChangeLog | 4 ++++ sb-mixi.el | 17 ++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c71c27..99982f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-11-22 OHASHI Akira + + * sb-mixi.el (shimbun-comment-article): Simplify. + 2006-11-22 KAMO Tomoyuki * mixi.el (mixi-get-matched-items): Fix the condition for quitting diff --git a/sb-mixi.el b/sb-mixi.el index 6c6e3c7..5ca6bcd 100644 --- a/sb-mixi.el +++ b/sb-mixi.el @@ -172,19 +172,14 @@ FUNCTION is the function for getting articles." (defun shimbun-comment-article (url header) (let ((parent (mixi-make-object-from-url url)) (date (shimbun-header-date header)) - (from (shimbun-header-from header))) + (message-id (shimbun-header-id header))) (catch 'found (mapc (lambda (comment) - (let ((nick (mixi-friend-nick (mixi-comment-owner comment))) - (time (shimbun-mixi-make-date comment)) - nick2) - ;; FIXME: How tricky it is. - (when (string-match "\\(.+\\)¤µ¤ó$" nick) - (setq nick2 (match-string 1 nick))) - (when (and - (or (string= (shimbun-mime-encode-string nick) from) - (string= (shimbun-mime-encode-string nick2) from)) - (string= time date)) + (let ((id (mixi-friend-id (mixi-comment-owner comment))) + (time (shimbun-mixi-make-date comment))) + (when (and (string= time date) + (string-match (concat "^<[0-9]+\\." id "@") + message-id)) ;; FIXME: Concat parent's information? (throw 'found (mixi-comment-content comment))))) ;; FIXME: Limit range? -- 1.7.10.4