From: teranisi Date: Fri, 13 Dec 2002 06:25:42 +0000 (+0000) Subject: * wl-thread.el (wl-thread-insert-message): Use wl-summary-max-thread-depth. X-Git-Tag: elmo-mark-restart~80 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8f839b877c1681c4ed59b9e23dd2a6933aebc622;p=elisp%2Fwanderlust.git * wl-thread.el (wl-thread-insert-message): Use wl-summary-max-thread-depth. * wl-summary.el (wl-summary-insert-thread-entity): Refined loop detection. * wl-message.el (wl-message-buffer-display): Back to the first page when cache is hit. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 6d777d7..e385ab1 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,14 @@ +2002-12-13 Yuuichi Teranishi + + * wl-thread.el (wl-thread-insert-message): Use + wl-summary-max-thread-depth. + + * wl-summary.el (wl-summary-insert-thread-entity): Refined + loop detection. + + * wl-message.el (wl-message-buffer-display): Back to the first page + when cache is hit. + 2002-12-12 Yuuichi Teranishi * wl-vars.el (wl-summary-max-thread-depth): New user option. diff --git a/wl/wl-message.el b/wl/wl-message.el index 0eef8c7..e9a5f43 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -481,6 +481,10 @@ Returns non-nil if bottom of message." ;; buffer cache is used. (setq cache-used t) (with-current-buffer hit + ;; Rewind to the top page + (widen) + (goto-char (point-min)) + (ignore-errors (wl-message-narrow-to-page)) (unless (eq wl-message-buffer-cur-flag flag) (setq read t)))) ;; delete tail and add new to the top. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index e5bd902..93e607f 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2705,7 +2705,7 @@ If ARG, without confirm." parent-entity parent-number (case-fold-search t) - (depth 0) + (depth 0) relatives anumber cur number overview2 cur-entity linked retval delayed-entity update-list entity-stack) (while entity @@ -2715,15 +2715,18 @@ 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 or reached to max depth, set parent as nil. (setq cur entity) - (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)))) + ;; If thread loop detected, set parent as nil. + (while cur + (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)) - (incf depth)) + (setq relatives (cons + (elmo-msgdb-overview-entity-get-number cur) + relatives))) (if (and parent-number (not (wl-thread-get-entity parent-number)) (not force-insert)) diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 0696269..462c28c 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -646,11 +646,19 @@ ENTITY is returned." When optional argument UPDATE is non-nil, Message is inserted to the summary buffer." (let ((parent (wl-thread-get-entity parent-msg)) + (depth 0) cur child-entity invisible-top) ;;; Update the thread view...not implemented yet. ;;; (when force-insert ;;; (if parent ;;; (wl-thread-entity-force-open parent)) + (when (and wl-summary-max-thread-depth parent) + (setq cur parent) + (while cur + (incf depth) + (setq cur (wl-thread-entity-get-parent-entity cur))) + (when (> depth wl-summary-max-thread-depth) + (setq parent nil))) (if parent ;; insert as children. (wl-thread-entity-insert-as-children