merge from trunk:
authoryoichi <yoichi>
Wed, 28 Jul 2004 13:18:57 +0000 (13:18 +0000)
committeryoichi <yoichi>
Wed, 28 Jul 2004 13:18:57 +0000 (13:18 +0000)
2003-10-31  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
* wl-summary.el (wl-summary-insert-thread): Fixed the logic to
detect thread loop.

wl/ChangeLog
wl/wl-summary.el

index 769c24a..4a10feb 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-31  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-insert-thread): Fixed the logic to
+       detect thread loop.
+
 2004-02-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * wl-highlight.el (wl-highlight-signature-search): Don't use
index f0dd2c6..0a2d1e3 100644 (file)
@@ -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))