* wl-summary.el (wl-summary-buffer-next-message-function): New variable.
authorteranisi <teranisi>
Wed, 20 Jun 2001 06:32:43 +0000 (06:32 +0000)
committerteranisi <teranisi>
Wed, 20 Jun 2001 06:32:43 +0000 (06:32 +0000)
(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
wl/wl-summary.el

index a98ee1f..f2042fa 100644 (file)
@@ -1,3 +1,12 @@
+2001-06-20  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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  <teranisi@gohome.org>
 
        * wl-util.el (wl-biff-check-folder): Use own buffer for pop3 biff
index 20ceab1..5d2e940 100644 (file)
@@ -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)
 
 (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