summaryrefslogtreecommitdiff
path: root/lisp/mwheel.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2002-03-02 08:21:33 +0000
committerMiles Bader <miles@gnu.org>2002-03-02 08:21:33 +0000
commitadf953ac72081b6238b88a1bf99efa2823b01eff (patch)
treeebfba885a9c9ea22ff499cef07266d442d63c492 /lisp/mwheel.el
parent3bdb7f808776ee824765fe596e83935f375880b3 (diff)
downloademacs-adf953ac72081b6238b88a1bf99efa2823b01eff.tar.gz
(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).
Diffstat (limited to 'lisp/mwheel.el')
-rw-r--r--lisp/mwheel.el10
1 files changed, 6 insertions, 4 deletions
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,