From: teranisi Date: Thu, 12 Dec 2002 04:02:17 +0000 (+0000) Subject: * wl-vars.el (wl-summary-max-thread-depth): New user option. X-Git-Tag: elmo-mark-restart~81 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f8ba9342893861ba7fb81bf1cc3274866d6068db;p=elisp%2Fwanderlust.git * wl-vars.el (wl-summary-max-thread-depth): New user option. * wl-summary.el (wl-summary-insert-thread-entity): If the thread depth is reached to wl-summary-max-thread-depth, divide the thread. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index cf4b2de..6d777d7 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2002-12-12 Yuuichi Teranishi + + * wl-vars.el (wl-summary-max-thread-depth): New user option. + + * wl-summary.el (wl-summary-insert-thread-entity): + If the thread depth is reached to wl-summary-max-thread-depth, + divide the thread. + 2002-12-08 Kenichi OKADA * wl-draft.el (wl-draft-send-mail-with-smtp): Fix logic diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 181808a..e5bd902 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2705,6 +2705,7 @@ If ARG, without confirm." parent-entity parent-number (case-fold-search t) + (depth 0) cur number overview2 cur-entity linked retval delayed-entity update-list entity-stack) (while entity @@ -2714,14 +2715,15 @@ If ARG, without confirm." parent-number (elmo-msgdb-overview-entity-get-number parent-entity)) (setq number (elmo-msgdb-overview-entity-get-number entity)) - ;; If thread loop detected, set parent as nil. + ;; If thread loop detected or reached to max depth, set parent as nil. (setq cur entity) - (while cur + (while (and cur (< depth wl-summary-max-thread-depth)) (if (eq number (elmo-msgdb-overview-entity-get-number (setq cur (elmo-msgdb-get-parent-entity cur msgdb)))) (setq parent-number nil - cur nil))) + cur nil)) + (incf depth)) (if (and parent-number (not (wl-thread-get-entity parent-number)) (not force-insert)) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index e7832e9..a4c9a17 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1585,6 +1585,12 @@ with wl-highlight-folder-many-face." :group 'wl-summary :group 'wl-pref) +(defcustom wl-summary-max-thread-depth 30 + "*If thread depth is larger than this value, don't treat it as a thread." + :type 'integer + :group 'wl-summary + :group 'wl-pref) + (defcustom wl-summary-no-from-message "nobody@nowhere?" "*A string displayed in summary when no from field exists." :type 'string