bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18212: 24.3.92; Left-click on a button is treated as mouse-2


From: Stefan Monnier
Subject: bug#18212: 24.3.92; Left-click on a button is treated as mouse-2
Date: Thu, 07 Aug 2014 09:08:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> If click with my left mouse button (normally mouse-1) on "button" text,
> Emacs appears to think I clicked mouse-2 (normally the middle button).

This is normal: it's because of mouse-1-click-follows-link and because
the button has the `follow-link' property.

> Recipe to reproduce:

> emacs -Q --exec "(global-set-key (kbd \"<down-mouse-2>\") 'clipboard-yank)" 
> --exec "(info)"

> Left-click on one of the hyperlinks.

> Emacs says
>   Buffer is read-only: #<buffer *info*>
> rather than following the hyperlink.

But that is indeed a bug.  I guess the button should locally bind
`down-mouse-2' to override the global binding.

But, in any case I recommend you bind clipboard-yank to `mouse-2' rather
than to `down-mouse-2' since you otherwise get a "double yank" behavior
(a mouse-2 click will first run clipboard-yank because of the
down-mouse-2 binding and then will run mouse-yank-primary because it's
bound to mouse-2).


        Stefan





reply via email to

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