+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.
+
2003-10-27 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-spam.el (wl-spam-setup): Modify wl-summary-reserve-mark-list
(defun wl-summary-insert-thread (entity folder update
&optional force-insert)
(let ((depth 0)
- this-id parent-entity parent-number relatives anumber
- cur number cur-entity linked retval delayed-entity
+ this-id parent-entity parent-number
+ number cur-entity linked retval delayed-entity
update-list entity-stack thread-entity)
(while entity
(setq this-id (elmo-message-entity-field entity 'message-id)
linked nil))
(setq parent-number (and parent-entity
(elmo-message-entity-number parent-entity)))
- (setq cur entity)
;; If thread loop detected, set parent as nil.
- (while cur
- (when (setq anumber
- (elmo-message-entity-number
- (setq cur (elmo-message-entity-parent folder cur))))
- (if (memq anumber relatives)
- (setq parent-number nil
- cur nil))
- (setq relatives (cons anumber relatives))))
+ (let ((cur entity)
+ anumber relatives)
+ (while cur
+ (when (setq anumber
+ (elmo-message-entity-number
+ (setq cur (elmo-message-entity-parent folder cur))))
+ (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))