+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
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))