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: Matthew Woodcraft
Subject: bug#18212: 24.3.92; Left-click on a button is treated as mouse-2
Date: Thu, 7 Aug 2014 22:02:28 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Stefan Monnier wrote:
> The fundamental reason for the difference is that
> mouse-1-click-follows-link defaults to 450, which means that we can't
> decide whether the down-mouse-1 should be turned into a down-mouse-2 or
> not until either we see the subsequent mouse-1 or 450ms have passed.
> In this case, the 450ms typically don't pass, but we had to wait for the
> mouse-1 to arrive.  At that point we turn those two events into
> down-mouse-2 and mouse-2.  So it looks just the same as what happens for
> a middle-click.  The crucial difference is that when the command bound
> to down-mouse-2 is run, we have already received the mouse-1 (aka
> mouse-2), and since errors have the side effect of emptying the "not yet
> processed input", the error on down-mouse-2 ends up canceling the
> subsequent mouse-1/2.

I see.


> I installed the workaround below,

> --- lisp/info.el      2014-03-14 20:51:22 +0000
> +++ lisp/info.el      2014-08-07 18:28:18 +0000
> @@ -3994,6 +3994,7 @@
>      (define-key map "," 'Info-index-next)
>      (define-key map "\177" 'Info-scroll-down)
>      (define-key map [mouse-2] 'Info-mouse-follow-nearest-node)
> +    (define-key map [down-mouse-2] 'ignore) ;Override potential global 
> binding.
>      (define-key map [follow-link] 'mouse-face)
>      (define-key map [XF86Back] 'Info-history-back)
>      (define-key map [XF86Forward] 'Info-history-forward)

Is that the right place for the workaround? The problem happens for any
link, not just those in info mode.

Maybe there's some way to behave more like 24.3, where (as far as I can
make out from describe-key output) left-click on a link gives
down-mouse-1 followed by mouse-2?


(This issue isn't causing me any problems; I'm just testing the pretest.
I had imenu bound to down-mouse-2 because it's slightly more responsive
than mouse-2, and left-clicking to follow links stopped working
altogether until I found out what was responsible. So I suppose it might
cause trouble for other people when they upgrade.)

-M-





reply via email to

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