* wl-vars.el (wl-summary-max-thread-depth): New user option.
authorteranisi <teranisi>
Thu, 12 Dec 2002 03:48:50 +0000 (03:48 +0000)
committerteranisi <teranisi>
Thu, 12 Dec 2002 03:48:50 +0000 (03:48 +0000)
* wl-summary.el (wl-summary-insert-thread-entity): If the thread depth is
 reached to wl-summary-max-thread-depth, divide the thread.

wl/ChangeLog
wl/wl-summary.el
wl/wl-vars.el

index c43993a..4cad7f9 100644 (file)
@@ -1,3 +1,11 @@
+2002-12-12  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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  <okada@opaopa.org>
 
        * wl-draft.el (wl-draft-send-mail-with-smtp): Fix logic
index cd546eb..c5ea754 100644 (file)
@@ -2756,14 +2756,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))
index d1f1b3c..b0de27d 100644 (file)
@@ -1607,6 +1607,12 @@ with wl-highlight-folder-many-face."
   :group 'wl-summary
   :group 'wl-pref)
 
+(defcustom wl-summary-max-thread-depth 30
+  "*If thread depth of the message is larger than this value, divide it."
+  :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