Improve documentation of wheel events

* doc/lispref/commands.texi (Misc Events): Add missing
parameters to `wheel-up' and `wheel-down'.
This commit is contained in:
Po Lu 2021-11-27 19:14:43 +08:00
parent f9457b8b01
commit f97539876a

View file

@ -1995,15 +1995,19 @@ frame has already been made visible, Emacs has no work to do.
@cindex @code{wheel-up} event
@cindex @code{wheel-down} event
@item (wheel-up @var{position})
@itemx (wheel-down @var{position})
@item (wheel-up @var{position} @var{clicks} @var{lines} @var{pixel-delta})
@itemx (wheel-down @var{position} @var{clicks} @var{lines} @var{pixel-delta})
These kinds of event are generated by moving a mouse wheel. The
@var{position} element is a mouse position list (@pxref{Click
Events}), specifying the position of the mouse cursor when the event
occurred. The event may have additional arguments after
@var{position}. The third argument after @var{position}, if present,
is a pair of the form @w{@code{(@var{x} . @var{y})}}, where @var{x}
and @var{y} are the number of pixels to scroll by in each axis.
occurred.
@var{clicks}, if present, is the number of times in quick succession
the wheel has been moved. @xref{Repeat Events}. @var{lines}, if
present and not @code{nil}, is the number of screen lines that should
be scrolled. @var{pixel-delta}, if present, is a pair of the form
@w{@code{(@var{x} . @var{y})}}, where @var{x} and @var{y} are the
number of pixels to scroll by in each axis.
@cindex pixel-resolution wheel events
You can use @var{x} and @var{y} to determine how much the mouse wheel