]> git.eshelyaron.com Git - emacs.git/commit
Support xterm-mouse-mode mouse-4/5
authorYuuki Harano <masm+github@masm11.me>
Tue, 16 Nov 2021 15:49:20 +0000 (00:49 +0900)
committerYuuki Harano <masm+github@masm11.me>
Tue, 16 Nov 2021 15:49:20 +0000 (00:49 +0900)
commitb22323c3b66feb3c9c0f3086cc784fab9578ff7b
tree3005fde9b0189069124c83d320451de213010976
parent47d0f6b5ecbf2a2b81364f9923ffe2b88ff19452
Support xterm-mouse-mode mouse-4/5

When I opened both pgtk frame and terminal frame using daemon
mode, I get mouse-4 on terminal frame and wheel-up on pgtk frame.
I support both events as mwheel events at the same time. (Bug#50321)

* lisp/mwheel.el (mouse-wheel-down-event): It is both mouse-4 and wheel-up.
(mouse-wheel-up-event): mouse-5 and wheel-down.
(mouse-wheel-left-event): mouse-6 and wheel-left.
(mouse-wheel-right-event): mouse-7 and wheel-right.
(mouse-wheel--button-eq): New function to test a button is included in
a list.
(mouse-wheel--button-flatten): New function to make flatten list of
events.
(mwheel-scroll): Use mouse-wheel--button-eq instead of eq.
(mouse-wheel-text-scale): Use mouse-wheel--button-eq instead of eq.
(mouse-wheel--setup-bindings): Make it flatten.
lisp/mwheel.el