(nth (- (length curc) 1)
curc))))
(wl-thread-entity-get-number curp)))
- (setcar (cddr to) (wl-append children
- (list (car entity))))
+ (wl-thread-entity-set-children to (wl-append children (list (car entity))))
(setq wl-thread-entities (cons entity wl-thread-entities))
(elmo-set-hash-val (format "#%d" (car entity)) entity
wl-thread-entity-hashtb)))
"Jump to the message with specified number in the current summary."
(interactive)
(let ((num (or number
- (string-to-int
+ (string-to-number
(read-from-minibuffer "Jump to Message(No.): ")))))
(wl-thread-entity-force-open (wl-thread-get-entity num))
(wl-summary-jump-to-msg num)))
(apply (function nconc)
update-msgs
(mapcar
- (function
- (lambda (message)
- (wl-thread-get-children-msgs message t)))
+ (lambda (message)
+ (wl-thread-get-children-msgs message t))
children))))
(wl-thread-entity-set-children
parent (append older-brothers children younger-brothers))
(let ((parent (wl-thread-get-entity parent-msg))
child-entity invisible-top)
;;; Update the thread view...not implemented yet.
-;;; (when force-insert
-;;; (if parent
+;;; (when force-insert
+;;; (if parent
;;; (wl-thread-entity-force-open parent))
(when (and wl-summary-max-thread-depth parent)
(let ((cur parent)
;; insert as children.
(wl-thread-entity-insert-as-children
parent
- (setq child-entity (wl-thread-create-entity
- msg (nth 0 parent) nil linked)))
+ (setq child-entity
+ (wl-thread-create-entity
+ msg (wl-thread-entity-get-number parent) nil linked)))
;; insert as top message.
(wl-thread-entity-insert-as-top
(wl-thread-create-entity msg nil)))
parent-msg))
(when parent
;; use thread structure.
- ;;(wl-thread-entity-get-nearly-older-brother
- ;; child-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-children-number invisible-top)
nil))))
-;(defun wl-thread-get-parent-list (msgs)
-; ;; return ancestors
-; (let* ((msgs2 msgs)
-; myself)
-; (while msgs2
-; (setq myself (car msgs2)
-; msgs2 (cdr msgs2))
-; (while (not (eq myself (car msgs2)))
-; (if (wl-thread-descendant-p myself (car msgs2))
-; (setq msgs (delq (car msgs2) msgs)))
-; (setq msgs2 (or (cdr msgs2) msgs)))
-; (setq msgs2 (cdr msgs2)))
-; msgs))
+;;;(defun wl-thread-get-parent-list (msgs)
+;;; ;; return ancestors
+;;; (let* ((msgs2 msgs)
+;;; myself)
+;;; (while msgs2
+;;; (setq myself (car msgs2)
+;;; msgs2 (cdr msgs2))
+;;; (while (not (eq myself (car msgs2)))
+;;; (if (wl-thread-descendant-p myself (car msgs2))
+;;; (setq msgs (delq (car msgs2) msgs)))
+;;; (setq msgs2 (or (cdr msgs2) msgs)))
+;;; (setq msgs2 (cdr msgs2)))
+;;; msgs))
(defun wl-thread-get-parent-list (msgs)
;; return connected ancestors
(setq temp-mark (wl-summary-get-score-mark msg-num)))
(setq message-entity
(elmo-message-entity wl-summary-buffer-elmo-folder
- (nth 0 entity)))
-;;; (wl-delete-all-overlays)
+ msg-num))
+;;; (wl-delete-all-overlays)
(when message-entity
(wl-summary-insert-line
(wl-summary-create-line
message-entity
(elmo-message-entity wl-summary-buffer-elmo-folder
- (nth 0 parent-entity))
+ (wl-thread-entity-get-number parent-entity))
temp-mark
(elmo-message-status wl-summary-buffer-elmo-folder msg-num)
(if wl-thread-insert-force-opened
(while msgs
(wl-thread-insert-entity-sub indent entity parent-entity all)
(setq msgs (cdr msgs))
- (setq children (nth 2 entity))
+ (setq children (wl-thread-entity-get-children entity))
(if children
;; insert children
(when (or wl-thread-insert-force-opened
(throw 'done t)))
nil)))
-;; (defun wl-thread-goto-bottom-of-sub-thread ()
-;; (interactive)
-;; (let ((depth (wl-thread-get-depth-of-current-line)))
-;; (forward-line 1)
-;; (while (and (not (eobp))
-;; (> (wl-thread-get-depth-of-current-line)
-;; depth))
-;; (forward-line 1))
-;; (beginning-of-line)))
+;;;(defun wl-thread-goto-bottom-of-sub-thread ()
+;;; (interactive)
+;;; (let ((depth (wl-thread-get-depth-of-current-line)))
+;;; (forward-line 1)
+;;; (while (and (not (eobp))
+;;; (> (wl-thread-get-depth-of-current-line)
+;;; depth))
+;;; (forward-line 1))
+;;; (beginning-of-line)))
(defun wl-thread-goto-bottom-of-sub-thread (&optional msg)
(interactive)
(let (depth beg)
(wl-thread-entity-set-opened entity nil)
(setq depth (wl-thread-get-depth-of-current-line))
- (beginning-of-line)
- (setq beg (point))
+ (setq beg (point-at-bol))
(wl-thread-goto-bottom-of-sub-thread)
(wl-thread-remove-argument-region beg
(point))
(wl-thread-insert-entity (- depth 1)
entity
(wl-thread-get-entity
- (nth 3 entity))
+ (wl-thread-entity-get-parent entity))
nil)
(delete-char 1) ; delete '\n'
(wl-thread-print-argument-region beg (point))))
(defun wl-thread-open (entity)
(let (depth beg)
- (beginning-of-line)
- (setq beg (point))
+ (setq beg (point-at-bol))
(setq depth (wl-thread-get-depth-of-current-line))
- (end-of-line)
- (delete-region beg (point))
+ (delete-region (point-at-bol) (point-at-eol))
(wl-thread-entity-set-opened entity t)
(wl-thread-insert-entity depth ;(- depth 1)
entity
(wl-thread-get-entity
- (nth 3 entity)) nil)
+ (wl-thread-entity-get-parent entity))
+ nil)
(delete-char 1) ; delete '\n'
(wl-thread-print-argument-region beg (point))))
(defun wl-thread-open-close (&optional force-open)
(interactive "P")
(when (eq wl-summary-buffer-view 'thread)
-;;; (if (equal wl-thread-top-entity '(nil t nil nil))
+;;; (if (equal wl-thread-top-entity '(nil t nil nil))
;;; (error "There's no thread structure"))
(save-excursion
(let ((inhibit-read-only t)
(if (string= dst-parent "")
(setq dst-parent nil)
(if (interactive-p)
- (setq dst-parent (string-to-int dst-parent))
+ (setq dst-parent (string-to-number dst-parent))
(setq dst-parent parent-number)))
(if (and dst-parent
(memq dst-parent (wl-thread-get-children-msgs number)))