changeset 43627:0f257be5fa6a

(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).
author Miles Bader <miles@gnu.org>
date Sat, 02 Mar 2002 08:18:12 +0000
parents de43922d0921
children c72279c9b54b
files lisp/mwheel.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mwheel.el	Sat Mar 02 00:14:09 2002 +0000
+++ b/lisp/mwheel.el	Sat Mar 02 08:18:12 2002 +0000
@@ -122,10 +122,12 @@
                      (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,