From 6aa6227af026a304a278df765d011e3e2b824a76 Mon Sep 17 00:00:00 2001 From: bg66 Date: Wed, 22 Nov 2006 02:47:35 +0000 Subject: [PATCH] * mixi.el (mixi-get-matched-items): Fix the condition for quitting retrieval. --- ChangeLog | 5 +++++ mixi.el | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2d65f1..8c71c27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-22 KAMO Tomoyuki + + * mixi.el (mixi-get-matched-items): Fix the condition for quitting + retrieval. + 2006-11-20 OHASHI Akira * sb-mixi.el (shimbun-mixi-get-comment-p): New user option. diff --git a/mixi.el b/mixi.el index a0a4e43..bf95ff5 100644 --- a/mixi.el +++ b/mixi.el @@ -354,7 +354,8 @@ Increase this value when unexpected error frequently occurs." (catch 'end (while (or (null max-numbers) (< (length ids) max-numbers)) (with-mixi-retrieve (format url page) - (let ((pos 0)) + (let ((pos 0) + found) (while (and (string-match regexp buffer pos) (or (null max-numbers) (< (length ids) max-numbers))) (let ((num 1) @@ -362,11 +363,11 @@ Increase this value when unexpected error frequently occurs." (while (match-string num buffer) (setq list (cons (match-string num buffer) list)) (incf num)) - (when (member (reverse list) ids) - (throw 'end ids)) - (setq ids (cons (reverse list) ids)) + (when (not (member (reverse list) ids)) + (setq found t) + (setq ids (cons (reverse list) ids))) (setq pos (match-end (1- num))))) - (when (eq pos 0) + (when (not found) (throw 'end ids)))) (incf page))) ;; FIXME: Sort? Now order by newest. -- 1.7.10.4