From 4631e27f0a282d49b86f63ed4eb35f4cd6978700 Mon Sep 17 00:00:00 2001 From: yoichi Date: Wed, 28 Jul 2004 13:18:57 +0000 Subject: [PATCH] merge from trunk: 2003-10-31 Hiroya Murata * wl-summary.el (wl-summary-insert-thread): Fixed the logic to detect thread loop. --- wl/ChangeLog | 5 +++++ wl/wl-summary.el | 17 ++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 769c24a..4a10feb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2003-10-31 Hiroya Murata + + * wl-summary.el (wl-summary-insert-thread): Fixed the logic to + detect thread loop. + 2004-02-19 Katsumi Yamaoka * wl-highlight.el (wl-highlight-signature-search): Don't use diff --git a/wl/wl-summary.el b/wl/wl-summary.el index f0dd2c6..0a2d1e3 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2752,13 +2752,16 @@ If ARG, without confirm." parent-entity)) (setq number (elmo-msgdb-overview-entity-get-number entity)) ;; If thread loop detected, set parent as nil. - (setq cur entity) - (while cur - (if (eq number (elmo-msgdb-overview-entity-get-number - (setq cur - (elmo-msgdb-get-parent-entity cur msgdb)))) - (setq parent-number nil - cur nil))) + (let ((cur entity) + anumber relatives) + (while cur + (when (setq anumber + (elmo-msgdb-overview-entity-get-number + (setq cur (elmo-msgdb-get-parent-entity cur msgdb)))) + (if (memq anumber relatives) + (setq parent-number nil + cur nil)) + (setq relatives (cons anumber relatives))))) (if (and parent-number (not (wl-thread-get-entity parent-number)) (not force-insert)) -- 1.7.10.4