From: teranisi Date: Thu, 29 Jan 2004 04:06:20 +0000 (+0000) Subject: * wl-summary.el (wl-summary-setup-mouse)[non-xemacs]: Bind mouse-wheel1 X-Git-Tag: wl-2_11_24~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ca7091f9d4b4ee2344035823ce09ad2d3ac1939;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-setup-mouse)[non-xemacs]: Bind mouse-wheel1 to wl-summary-wheel-dispatcher. * wl-e21.el (wl-message-define-keymap): Bind mouse-wheel1 to wl-message-wheel-dispatcher. (wl-message-wheel-dispatcher): New function. (wl-summary-wheel-dispatcher): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 7ef680e..b9cfce4 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2004-01-29 Yuuichi Teranishi + + * wl-summary.el (wl-summary-setup-mouse)[non-xemacs]: Bind mouse-wheel1 + to wl-summary-wheel-dispatcher. + + * wl-e21.el (wl-message-define-keymap): Bind mouse-wheel1 to + wl-message-wheel-dispatcher. + (wl-message-wheel-dispatcher): New function. + (wl-summary-wheel-dispatcher): Ditto. + 2004-01-28 Yuuichi Teranishi * wl-action.el (wl-summary-target-mark-all): List messages which are diff --git a/wl/wl-e21.el b/wl/wl-e21.el index e71b290..eee3264 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -537,6 +537,9 @@ (define-key keymap [mouse-5] 'wl-message-wheel-up) (define-key keymap [S-mouse-4] 'wl-message-wheel-down) (define-key keymap [S-mouse-5] 'wl-message-wheel-up) + ;; Meadow2 + (define-key keymap [mouse-wheel1] 'wl-message-wheel-dispatcher) + (define-key keymap [S-mouse-wheel1] 'wl-message-wheel-dispatcher) (set-keymap-parent wl-message-button-map keymap) (define-key wl-message-button-map [mouse-2] 'wl-message-button-dispatcher) @@ -544,6 +547,23 @@ (defalias 'wl-setup-message 'wl-e21-setup-message-toolbar) +;; Wheel handling for Meadow2 +(defun wl-message-wheel-dispatcher (event) + (interactive "e") + (if (< (nth 4 (nth 1 event)) 0) + (wl-message-wheel-up event) + (wl-message-wheel-down event))) + +(defun wl-summary-wheel-dispatcher (event) + (interactive "e") + (if (< (nth 4 (nth 1 event)) 0) + (if (memq 'shift (event-modifiers event)) + (wl-summary-down) + (wl-summary-next)) + (if (memq 'shift (event-modifiers event)) + (wl-summary-up) + (wl-summary-prev)))) + (defun wl-message-wheel-up (event) (interactive "e") (if (string-match (regexp-quote wl-message-buffer-name) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 741d99f..fd8cdf8 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -379,6 +379,11 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map [mouse-5] 'wl-summary-next) (define-key wl-summary-mode-map [S-mouse-4] 'wl-summary-up) (define-key wl-summary-mode-map [S-mouse-5] 'wl-summary-down) + ;; For Meadow2 + (define-key wl-summary-mode-map [mouse-wheel1] + 'wl-summary-wheel-dispatcher) + (define-key wl-summary-mode-map [S-mouse-wheel1] + 'wl-summary-wheel-dispatcher) (define-key wl-summary-mode-map [mouse-2] 'wl-summary-click))) (if wl-summary-mode-map