1 |
;;; mwheel.el --- Wheel mouse support |
;;; mwheel.el --- Wheel mouse support |
2 |
|
|
3 |
;; Copyright (C) 1998,2000,2001,2002 Free Software Foundation, Inc. |
;; Copyright (C) 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. |
4 |
;; Maintainer: William M. Perry <wmperry@gnu.org> |
;; Maintainer: William M. Perry <wmperry@gnu.org> |
5 |
;; Keywords: mouse |
;; Keywords: mouse |
6 |
|
|
137 |
(integer :tag "Specific # of lines") |
(integer :tag "Specific # of lines") |
138 |
(float :tag "Fraction of window")))))) |
(float :tag "Fraction of window")))))) |
139 |
|
|
140 |
(defcustom mouse-wheel-progessive-speed t |
(defcustom mouse-wheel-progressive-speed t |
141 |
"If non-nil, the faster the user moves the wheel, the faster the scrolling. |
"If non-nil, the faster the user moves the wheel, the faster the scrolling. |
142 |
Note that this has no effect when `mouse-wheel-scroll-amount' specifies |
Note that this has no effect when `mouse-wheel-scroll-amount' specifies |
143 |
a \"near full screen\" scroll or when the mouse wheel sends key instead |
a \"near full screen\" scroll or when the mouse wheel sends key instead |
197 |
(let ((list-elt mouse-wheel-scroll-amount)) |
(let ((list-elt mouse-wheel-scroll-amount)) |
198 |
(while (consp (setq amt (pop list-elt)))))) |
(while (consp (setq amt (pop list-elt)))))) |
199 |
(if (floatp amt) (setq amt (1+ (truncate (* amt (window-height)))))) |
(if (floatp amt) (setq amt (1+ (truncate (* amt (window-height)))))) |
200 |
(when (and mouse-wheel-progessive-speed (numberp amt)) |
(when (and mouse-wheel-progressive-speed (numberp amt)) |
201 |
;; When the double-mouse-N comes in, a mouse-N has been executed already, |
;; When the double-mouse-N comes in, a mouse-N has been executed already, |
202 |
;; So by adding things up we get a squaring up (1, 3, 6, 10, 15, ...). |
;; So by adding things up we get a squaring up (1, 3, 6, 10, 15, ...). |
203 |
(setq amt (* amt (event-click-count event)))) |
(setq amt (* amt (event-click-count event)))) |
250 |
|
|
251 |
(provide 'mwheel) |
(provide 'mwheel) |
252 |
|
|
253 |
;;; arch-tag: 50ed00e7-3686-4b7a-8037-fb31aa5c237f |
;; arch-tag: 50ed00e7-3686-4b7a-8037-fb31aa5c237f |
254 |
;;; mwheel.el ends here |
;;; mwheel.el ends here |