From adf953ac72081b6238b88a1bf99efa2823b01eff Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 2 Mar 2002 08:21:33 +0000 Subject: [PATCH] (mwheel-scroll): Remove `double' and `triple' from the event-modifiers before looking up in `mouse-wheel-scroll-amount'. If there's no applicable modifiers entry in the alist in `mouse-wheel-scroll-amount', fall back to the default, not to nil (which causes full screen scrolls). --- lisp/ChangeLog | 8 ++++++++ lisp/mwheel.el | 10 ++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f971abde39d..76e84ecb888 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-03-02 Miles Bader + + * mwheel.el (mwheel-scroll): Remove `double' and `triple' from the + event-modifiers before looking up in `mouse-wheel-scroll-amount'. + If there's no applicable modifiers entry in the alist in + `mouse-wheel-scroll-amount', fall back to the default, not to + nil (which causes full screen scrolls). + 2002-03-01 Andreas Schwab * textmodes/texnfo-upd.el (texinfo-start-menu-description): Remove diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 4080e7451ed..27a487d0ef6 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -122,10 +122,12 @@ This should only be bound to mouse buttons 4 and 5." (prog1 (selected-window) (select-window (mwheel-event-window event))))) - (mods (delete 'click (event-modifiers event))) - (amt (if mods - (cdr (assoc mods (cdr mouse-wheel-scroll-amount))) - (car mouse-wheel-scroll-amount)))) + (mods + (delq 'click (delq 'double (delq 'triple (event-modifiers event))))) + (amt + (or (and mods + (cdr (assoc mods (cdr mouse-wheel-scroll-amount)))) + (car mouse-wheel-scroll-amount)))) (if (floatp amt) (setq amt (1+ (truncate (* amt (window-height)))))) (when (and mouse-wheel-progessive-speed (numberp amt)) ;; When the double-mouse-N comes in, a mouse-N has been executed already, -- 2.39.5