From 59e28a37f8bcf3d888545efdb3fe832753bfbf4d Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 20 Jun 2001 06:32:43 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-buffer-next-message-function): New variable. (wl-summary-next-message): Call wl-summary-buffer-next-message-function if it is bound. (wl-summary-cursor-move): If return value of wl-summary-next-message is not number, don't jump. --- wl/ChangeLog | 9 +++++++ wl/wl-summary.el | 70 +++++++++++++++++++++++++++++------------------------- 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index a98ee1f..f2042fa 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2001-06-20 Yuuichi Teranishi + + * wl-summary.el (wl-summary-buffer-next-message-function): New + variable. + (wl-summary-next-message): Call wl-summary-buffer-next-message-function + if it is bound. + (wl-summary-cursor-move): If return value of + wl-summary-next-message is not number, don't jump. + 2001-06-18 Yuuichi Teranishi * wl-util.el (wl-biff-check-folder): Use own buffer for pop3 biff diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 20ceab1..5d2e940 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -96,6 +96,7 @@ (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) @@ -164,6 +165,7 @@ (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) @@ -4539,37 +4541,40 @@ If ARG, exit virtual folder." 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) @@ -4579,7 +4584,8 @@ If ARG, exit virtual folder." (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 -- 1.7.10.4