- (save-excursion
- (wl-summary-jump-to-msg (wl-thread-entity-get-number entity))
- (beginning-of-line)
- (let ((text-prop (get-text-property (point) 'face))
- from from-end beg str)
- (cond
- ((looking-at (concat "^" wl-summary-buffer-number-regexp
- "..../..\(.*\)..:.. ["
- wl-thread-indent-regexp
- "]*[[<]\\+\\([0-9]+\\):"))
- (delete-region (match-beginning 1)(match-end 1))
- (goto-char (match-beginning 1))
- (setq str (format "%s" (wl-thread-entity-get-children-num entity)))
- (if wl-summary-highlight
- (put-text-property 0 (length str) 'face text-prop str))
- (insert str))
- ((looking-at (concat "^" wl-summary-buffer-number-regexp
- "..../..\(.*\)..:.. ["
- wl-thread-indent-regexp
- "]*[[<]"))
- (goto-char (match-end 0))
- (setq beg (current-column))
- (setq from-end (save-excursion
- (move-to-column (+ 1 beg wl-summary-from-width))
- (point)))
- (setq from (buffer-substring (match-end 0) from-end))
- (delete-region (match-end 0) from-end)
- (setq str (wl-set-string-width
- (1+ wl-summary-from-width)
- (format
- "+%s:%s"
- (wl-thread-entity-get-children-num
- entity)
- from)))
- (if wl-summary-highlight
- (put-text-property 0 (length str) 'face text-prop str))
- (insert str)
- (condition-case nil ; it's dangerous, so ignore error.
- (run-hooks 'wl-thread-update-children-number-hook)
- (error
- (ding)
- (message "Error in wl-thread-update-children-number-hook."))))))))