From: hmurata Date: Fri, 31 Oct 2003 17:40:07 +0000 (+0000) Subject: (wl-summary-insert-thread): Fixed the logic to X-Git-Tag: wl-2_11_21~34 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3288a750fdb7f24e0a3fce2b14a613f37f9a1d3b;p=elisp%2Fwanderlust.git (wl-summary-insert-thread): Fixed the logic to detect thread loop. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 3c24a5e..7d2ce03 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. + 2003-10-27 Hiroya Murata * wl-spam.el (wl-spam-setup): Modify wl-summary-reserve-mark-list diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 1e91ba5..fbd0084 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2563,8 +2563,8 @@ If ARG, without confirm." (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) @@ -2583,16 +2583,17 @@ If ARG, without confirm." 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))