- (let ((older-brothers (wl-thread-entity-get-older-brothers
- entity nil))
- (younger-brothers (wl-thread-entity-get-younger-brothers
- entity nil)))
- (setq wl-thread-entity-list
- (append (append older-brothers
- (and top-child (list top-child)))
- younger-brothers))))))
+ (let ((match (memq msg wl-thread-entity-list)))
+ (when match
+ (if top-child
+ (setcar match top-child)
+ (setq wl-thread-entity-list
+ (delq msg wl-thread-entity-list))))))))