[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Eli Zaretskii
Subject: bug#5557: <left-margin> <double-wheel-down> is undefined
Date: Thu, 13 Aug 2020 16:06:34 +0300

> From: Stefan Kangas <stefan@marxist.se>
> Date: Wed, 12 Aug 2020 22:34:10 -0700
> Cc: Lars Ingebrigtsen <larsi@gnus.org>, Eli Zaretskii <eliz@gnu.org>, 
> 5557@debbugs.gnu.org, 
>       lennart.borgman@gmail.com
> > Nowadays practically all applications scroll the window vertically
> > regardless of where the mouse pointer is - even when it's on the
> > horizontal scroll bar.  The only exception is the title bar where some
> > window managers optionally "roll" the window in or out.
> That strengthens the case for doing the same in Emacs.
> I have attached a patch which implements this functionality.
> Any comments?

I have some:

> +(defun mouse-wheel--create-scroll-keys-get-key (binding event)
> +  "Given BINDING and EVENT, return symbol for key.
> +Arguments are like in `mouse-wheel--create-scroll-keys'."
> +  (intern (concat (pcase (caar binding)
> +                    ('alt "A-") ('control "C-") ('hyper "H-")
> +                    ('meta "M-") ('shift "S-") ('super "s-"))
> +                  (symbol-name event))))

I don't think I understand why we want to usurp mouse-wheel with every
possible modifier.  I think the request was to honor only unmodified
mouse-wheel scrolls, no?  Let's leave the modifiers to user bindings.

> +(defun mouse-wheel--create-scroll-keys (binding event)
> +  "Return list of key vectors for BINDING and EVENT.
> +BINDING is an element in `mouse-wheel-scroll-amount'.  EVENT is
> +an event used for scrolling, e.g. `mouse-wheel-down-event'."
> +  (let ((prefixes (list 'left-margin 'right-margin
> +                        'left-fringe 'right-fringe))

Martin says (and I concur) that we should also do this on horizontal
scroll bars and on the mode/header-lines.

Finally, this needs a NEWS entry.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]