From: murata Date: Sat, 27 May 2000 01:02:24 +0000 (+0000) Subject: (wl-thread-cleanup-symbols): If entity is exists, delete entity. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5d7943e01fbb3b0bb9776395dff5bb00b06d303;p=elisp%2Fwanderlust.git (wl-thread-cleanup-symbols): If entity is exists, delete entity. (wl-thread-set-parent): If insert as top, set linked as nil. --- diff --git a/wl/wl-thread.el b/wl/wl-thread.el index a62577e..6d8a27e 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -762,15 +762,14 @@ the closed parent will be opened." nil))) (defun wl-thread-cleanup-symbols (msgs) - (let (sym) + (let (entity) (while msgs - ;; delete entity. - (setq wl-thread-entities - (delq (wl-thread-get-entity (car msgs)) - wl-thread-entities)) - ;; free symbol. - (elmo-clear-hash-val (format "#%d" (car msgs)) - wl-thread-entity-hashtb) + (when (setq entity (wl-thread-get-entity (car msgs))) + ;; delete entity. + (setq wl-thread-entities (delq entity wl-thread-entities)) + ;; free symbol. + (elmo-clear-hash-val (format "#%d" (car msgs)) + wl-thread-entity-hashtb)) (setq msgs (cdr msgs))))) (defun wl-thread-delete-message (msg &optional deep update) @@ -1535,15 +1534,16 @@ Message is inserted to the summary buffer." (car (last children)) t))) (wl-thread-entity-set-children dst-parent-entity - (append children (list number)))) + (append children (list number))) + (wl-thread-entity-set-linked entity t)) ;; insert as top - (wl-append wl-thread-entity-list (list number))) + (wl-append wl-thread-entity-list (list number)) + (wl-thread-entity-set-linked entity nil)) ;; update my thread (wl-append update-msgs (wl-thread-get-children-msgs number t)) (setq update-msgs (elmo-uniq-list update-msgs)) (wl-thread-entity-set-parent entity dst-parent) - (wl-thread-entity-set-linked entity t) ;; update thread on buffer (wl-thread-update-line-msgs update-msgs t))))