all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master e720ba62193 1/2: (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
       [not found] ` <20240409143042.278CDC12C36@vcs2.savannah.gnu.org>
@ 2024-04-09 17:29   ` Eshel Yaron
  2024-04-09 20:39     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Eshel Yaron @ 2024-04-09 17:29 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

Hi Stefan,

Stefan Monnier writes:

> branch: master
> commit e720ba6219394d275dd741c5f17feea1ee0bf9af
> Author: Stefan Monnier <monnier@iro.umontreal.ca>
> Commit: Stefan Monnier <monnier@iro.umontreal.ca>
>
>     (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
>
>     Change the handling of the old X11 convention that uses mouse-4/5/6/7
>     events to represent wheel events: instead of asking downstream
>     packages to use the `mouse-wheel-*-event` variables to know which events
>     represent wheel events, use new var `mouse-wheel-buttons` to directly
>     convert those events into the standard `wheel-up/down/left/right` events
>     used everywhere else.
>
>     This will simplify the work of packages which can thus just bind their
>     commands to `wheel-up/down/left/right`.

[...]

> diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el
> index a86c1ba1cc9..a1e0abe2e14 100644
> --- a/lisp/completion-preview.el
> +++ b/lisp/completion-preview.el
> @@ -139,9 +139,13 @@ If this option is nil, these commands do not display any message."
>    ;; and vice versa!!
>    "<wheel-up>"     #'completion-preview-prev-candidate
>    "<wheel-down>"   #'completion-preview-next-candidate
> -  (key-description (vector mouse-wheel-up-event))
> +  (key-description (with-suppressed-warnings
> +                       ((obsolete mouse-wheel-up-event))
> +                     (vector mouse-wheel-up-event)))
>    #'completion-preview-next-candidate
> -  (key-description (vector mouse-wheel-down-event))
> +  (key-description (with-suppressed-warnings
> +                       ((obsolete mouse-wheel-down-event))
> +                     (vector mouse-wheel-down-event)))
>    #'completion-preview-prev-candidate)

I wonder whether/why we should keep the bindings that use
mouse-wheel-up/down-event here.  Do I understand correctly that since we
already bind wheel-down/up directly, we should now be able to simply
remove these additional bindings?


Thanks,

Eshel



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master e720ba62193 1/2: (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
  2024-04-09 17:29   ` master e720ba62193 1/2: (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events Eshel Yaron
@ 2024-04-09 20:39     ` Stefan Monnier
  2024-04-10 18:35       ` Eshel Yaron
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2024-04-09 20:39 UTC (permalink / raw)
  To: Eshel Yaron; +Cc: emacs-devel

> I wonder whether/why we should keep the bindings that use
> mouse-wheel-up/down-event here.  Do I understand correctly that since we
> already bind wheel-down/up directly, we should now be able to simply
> remove these additional bindings?

I had an earlier patch which was "more radical" in this way, but in the
end went with this half-way patch where people can set
`mouse-wheel-buttons` to nil and recover the old behavior.

We could remove most of those (if not all) uses of
`mouse-wheel-up/down/left/right-event`, but I don't think there's
a hurry to do that.

Admittedly, the ones in `completion-preview.el` could go because they're
new in Emacs-30 so there's no previous behavior to preserve.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master e720ba62193 1/2: (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
  2024-04-09 20:39     ` Stefan Monnier
@ 2024-04-10 18:35       ` Eshel Yaron
  2024-04-10 18:52         ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Eshel Yaron @ 2024-04-10 18:35 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I wonder whether/why we should keep the bindings that use
>> mouse-wheel-up/down-event here.  Do I understand correctly that since we
>> already bind wheel-down/up directly, we should now be able to simply
>> remove these additional bindings?
>
> I had an earlier patch which was "more radical" in this way, but in the
> end went with this half-way patch where people can set
> `mouse-wheel-buttons` to nil and recover the old behavior.
>
> We could remove most of those (if not all) uses of
> `mouse-wheel-up/down/left/right-event`, but I don't think there's
> a hurry to do that.

Got it, thanks.

> Admittedly, the ones in `completion-preview.el` could go because they're
> new in Emacs-30 so there's no previous behavior to preserve.

Indeed.  I think I'll remove them then, that way we won't need to
require mwheel in completion-preview.el anymore :)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master e720ba62193 1/2: (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
  2024-04-10 18:35       ` Eshel Yaron
@ 2024-04-10 18:52         ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2024-04-10 18:52 UTC (permalink / raw)
  To: Eshel Yaron; +Cc: emacs-devel

>> Admittedly, the ones in `completion-preview.el` could go because they're
>> new in Emacs-30 so there's no previous behavior to preserve.
> Indeed.  I think I'll remove them then, that way we won't need to
> require mwheel in completion-preview.el anymore :)

Sounds good,


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-10 18:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <171267304154.21960.14298364323940508129@vcs2.savannah.gnu.org>
     [not found] ` <20240409143042.278CDC12C36@vcs2.savannah.gnu.org>
2024-04-09 17:29   ` master e720ba62193 1/2: (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events Eshel Yaron
2024-04-09 20:39     ` Stefan Monnier
2024-04-10 18:35       ` Eshel Yaron
2024-04-10 18:52         ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.