(defvar wl-summary-buffer-saved-message nil)
(defvar wl-summary-buffer-prev-folder-func nil)
(defvar wl-summary-buffer-next-folder-func nil)
+(defvar wl-summary-buffer-next-message-func nil)
(defvar wl-summary-buffer-exit-func nil)
(defvar wl-summary-buffer-number-list nil)
(make-variable-buffer-local 'wl-thread-space-str-internal)
(make-variable-buffer-local 'wl-summary-buffer-prev-folder-func)
(make-variable-buffer-local 'wl-summary-buffer-next-folder-func)
+(make-variable-buffer-local 'wl-summary-buffer-next-message-func)
(make-variable-buffer-local 'wl-summary-buffer-exit-func)
(make-variable-buffer-local 'wl-summary-buffer-number-list)
wl-summary-important-mark))))))
(defsubst wl-summary-next-message (num direction hereto)
- (let ((cur-spec (cdr (assq wl-summary-move-order
- (if (elmo-folder-plugged-p wl-summary-buffer-folder-name)
- wl-summary-move-spec-plugged-alist
- wl-summary-move-spec-unplugged-alist))))
- (nums (memq num (if (eq direction 'up)
- (reverse wl-summary-buffer-number-list)
- wl-summary-buffer-number-list)))
- marked-list nums2)
- (unless hereto (setq nums (cdr nums)))
- (setq nums2 nums)
- (if cur-spec
- (catch 'done
- (while cur-spec
- (setq nums nums2)
- (cond ((eq (car (car cur-spec)) 'p)
- (if (setq marked-list (elmo-msgdb-list-messages-mark-match
- wl-summary-buffer-msgdb
- (cdr (car cur-spec))))
- (while nums
- (if (memq (car nums) marked-list)
- (throw 'done (car nums)))
- (setq nums (cdr nums)))))
- ((eq (car (car cur-spec)) 't)
- (while nums
- (if (and wl-summary-buffer-target-mark-list
- (memq (car nums)
- wl-summary-buffer-target-mark-list))
- (throw 'done (car nums)))
- (setq nums (cdr nums)))))
- (setq cur-spec (cdr cur-spec))))
- (car nums))))
+ (if wl-summary-buffer-next-message-func
+ (funcall wl-summary-buffer-next-message-func num direction hereto)
+ (let ((cur-spec (cdr (assq wl-summary-move-order
+ (if (elmo-folder-plugged-p
+ wl-summary-buffer-folder-name)
+ wl-summary-move-spec-plugged-alist
+ wl-summary-move-spec-unplugged-alist))))
+ (nums (memq num (if (eq direction 'up)
+ (reverse wl-summary-buffer-number-list)
+ wl-summary-buffer-number-list)))
+ marked-list nums2)
+ (unless hereto (setq nums (cdr nums)))
+ (setq nums2 nums)
+ (if cur-spec
+ (catch 'done
+ (while cur-spec
+ (setq nums nums2)
+ (cond ((eq (car (car cur-spec)) 'p)
+ (if (setq marked-list (elmo-msgdb-list-messages-mark-match
+ wl-summary-buffer-msgdb
+ (cdr (car cur-spec))))
+ (while nums
+ (if (memq (car nums) marked-list)
+ (throw 'done (car nums)))
+ (setq nums (cdr nums)))))
+ ((eq (car (car cur-spec)) 't)
+ (while nums
+ (if (and wl-summary-buffer-target-mark-list
+ (memq (car nums)
+ wl-summary-buffer-target-mark-list))
+ (throw 'done (car nums)))
+ (setq nums (cdr nums)))))
+ (setq cur-spec (cdr cur-spec))))
+ (car nums)))))
(defsubst wl-summary-cursor-move (direction hereto)
(when (and (eq direction 'up)
(let (num)
(when (setq num (wl-summary-next-message (wl-summary-message-number)
direction hereto))
- (wl-thread-jump-to-msg num)
+ (if (numberp num)
+ (wl-thread-jump-to-msg num))
t)))
;;
;; Goto unread or important