Revert last commit (I'm sorry it was my mistake).
[elisp/wanderlust.git] / wl / wl-thread.el
index fe8c722..5e5bca3 100644 (file)
   "If parent of ENTITY is invisible, the top invisible ancestor entity of
 ENTITY is returned."
   (let ((cur-entity entity)
-       ret-val)
+       top)
     (catch 'done
       (while (setq cur-entity (wl-thread-entity-get-parent-entity
                               cur-entity))
        (if (null (wl-thread-entity-get-number cur-entity))
-           ;; top!!
-           (progn
-             ;;(setq ret-val nil)
-             (throw 'done nil))
+           (throw 'done nil)
          (when (not (wl-thread-entity-get-opened cur-entity))
-           ;; not opened!!
-           (setq ret-val cur-entity)))))
-    ;; top of closed entity in the path.
-    ret-val))
+           (setq top cur-entity)))))
+    top))
 
 (defun wl-thread-entity-get-nearly-older-brother (entity &optional parent)
   (let ((brothers (wl-thread-entity-get-older-brothers entity parent)))
@@ -681,10 +676,9 @@ Message is inserted to the summary buffer."
                parent-msg (wl-summary-buffer-msgdb)))
              (when parent
                ;; use thread structure.
-               (wl-thread-entity-get-nearly-older-brother
-                child-entity parent))) ; return value
-;;;            (wl-thread-entity-get-number
-;;;             (wl-thread-entity-get-top-entity parent)))) ; return value;
+               ;;(wl-thread-entity-get-nearly-older-brother
+               ;; child-entity parent))) ; return value
+               (wl-thread-entity-get-number parent))) ; return value
 ;;;          (setq beg (point))
 ;;;          (wl-thread-goto-bottom-of-sub-thread)
 ;;;          (wl-thread-update-indent-string-region beg (point)))
@@ -1103,8 +1097,8 @@ Message is inserted to the summary buffer."
   (save-excursion
     (goto-char beg)
     (while (< (point) end)
-      ;(wl-thread-update-indent-string)
-      (wl-thread-update-line-on-buffer)
+      (save-excursion
+       (wl-thread-update-line-on-buffer-sub nil (wl-summary-message-number)))
       (forward-line 1))))
 
 (defsubst wl-thread-make-indent-string (entity)