Subject: Re: bug#5557: <left-margin> <double-wheel-down> is undefined

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 01 Oct 2019 18:19:30 +0200

Eli Zaretskii <[email-masked]> writes:

> Yes, see set-window-margins.

Ah, thanks.

After

(set-window-margins (get-buffer-window) 10 10)

and I try to do any mouse stuff there, I get

<left-margin> <down-mouse-1> is undefined
<left-margin> <mouse-1> is undefined

(I don't have a mouse with a scroll wheel.)

So I guess what should be changed is this:

  (when mouse-wheel-mode
    (dolist (event (list mouse-wheel-down-event mouse-wheel-up-event mouse-wheel-right-event mouse-wheel-left-event))
      (dolist (key (mapcar (lambda (amt) `[(,@(if (consp amt) (car amt)) ,event)])
                           mouse-wheel-scroll-amount))
        (global-set-key key 'mwheel-scroll)
        (push key mwheel-installed-bindings)))))

to also work in left-margin/right-margin?  It's a bit difficult for me
to test since I don't have a scroll wheel -- can somebody who has one do
the additional key bindings?  (The code is in mwheel.el.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no