Variable: mouse-wheel-scroll-amount
mouse-wheel-scroll-amount is a customizable variable defined in
mwheel.el.gz.
Value
(1 ((shift) . hscroll) ((meta)) ((control meta) . global-text-scale)
((control) . text-scale))
Documentation
Amount to scroll windows by when spinning the mouse wheel.
This is an alist mapping the modifier key to the amount to scroll when the wheel is moved with the modifier key depressed. Elements of the list have the form (MODIFIER . AMOUNT) or just AMOUNT if MODIFIER is nil.
AMOUNT should be the number of lines to scroll, or nil for near full
screen. It can also be a floating point number, specifying the fraction of
a full screen to scroll. A near full screen is next-screen-context-lines
less than a full screen.
If AMOUNT is the symbol hscroll, this means that with MODIFIER,
the mouse wheel will scroll horizontally instead of vertically.
If AMOUNT is the symbol text-scale or global-text-scale, this
means that with MODIFIER, the mouse wheel will change the font size
instead of scrolling (by adjusting the font height of the default
face, either locally in the buffer or globally). For more
information, see text-scale-adjust and global-text-scale-adjust.
This variable was added, or its default value changed, in Emacs 28.1.
Probably introduced at or before Emacs version 21.1.
Source Code
;; Defined in /usr/src/emacs/lisp/mwheel.el.gz
(defcustom mouse-wheel-scroll-amount
'(1 ((shift) . hscroll)
((meta) . nil)
((control meta) . global-text-scale)
((control) . text-scale))
"Amount to scroll windows by when spinning the mouse wheel.
This is an alist mapping the modifier key to the amount to scroll when
the wheel is moved with the modifier key depressed.
Elements of the list have the form (MODIFIER . AMOUNT) or just AMOUNT if
MODIFIER is nil.
AMOUNT should be the number of lines to scroll, or nil for near full
screen. It can also be a floating point number, specifying the fraction of
a full screen to scroll. A near full screen is `next-screen-context-lines'
less than a full screen.
If AMOUNT is the symbol `hscroll', this means that with MODIFIER,
the mouse wheel will scroll horizontally instead of vertically.
If AMOUNT is the symbol `text-scale' or `global-text-scale', this
means that with MODIFIER, the mouse wheel will change the font size
instead of scrolling (by adjusting the font height of the default
face, either locally in the buffer or globally). For more
information, see `text-scale-adjust' and `global-text-scale-adjust'."
:group 'mouse
:type '(cons
(choice :tag "Normal"
(const :tag "Full screen" :value nil)
(integer :tag "Specific # of lines")
(float :tag "Fraction of window")
(cons
(repeat (choice :tag "modifier"
(const alt) (const control) (const hyper)
(const meta) (const shift) (const super)))
(choice :tag "action"
(const :tag "Scroll full screen" :value nil)
(integer :tag "Scroll specific # of lines")
(float :tag "Scroll fraction of window"))))
(repeat
(cons
(repeat (choice :tag "modifier"
(const alt) (const control) (const hyper)
(const meta) (const shift) (const super)))
(choice :tag "action"
(const :tag "Scroll full screen" :value nil)
(integer :tag "Scroll specific # of lines")
(float :tag "Scroll fraction of window")
(const :tag "Scroll horizontally" :value hscroll)
(const :tag "Change buffer face size" :value text-scale)
(const :tag "Change global face size" :value global-text-scale)))))
:set #'mouse-wheel-change-button
:version "28.1")