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

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

bug#7802: 24.0.50; Extraneous `mouse-3' event when do `double-mouse-3'


From: Drew Adams
Subject: bug#7802: 24.0.50; Extraneous `mouse-3' event when do `double-mouse-3'
Date: Fri, 7 Jan 2011 11:11:18 -0800

emacs -Q
 
(global-set-key [mouse-3]
                (lambda () (interactive) (message "AAAAAAAAAAAA")))
(global-set-key [double-mouse-3] 
                (lambda () (interactive) (message "BBBBBBBBBBBBBB")))
 
Now just double-click `mouse-3'.  You see message "AAAAAAAAAAAA" in
*Messages*, as well as message "BBBBBBBBBBBBBB".
 
This is a no-no.  There is, or at least there should be, no single-click
event.  There should be only a double-click event.
 
The Elisp manual says (node `Repeat Events'):
"If a double-click event has no binding, the binding of the
corresponding ordinary click event is used to execute it."
 
Note the condition: "if a double-click event has no binding".  If there
is a double-click binding then I do not think the single-click binding
should be invoked.  Users should be able to have a double-click binding
be invoked without a single-click binding also being invoked.
 
---
 
[BTW, the rest of the sentence, after the condition, is not correct.  It
is grammatically correct, but it doesn't mean much, and it certainly
doesn't mean what we want.
 
The binding of the "ordinary click event" (which first of all should say
"single", not "ordinary", which is undefined) is a command.  It is not
correct to say that some command "is used to execute it".  Execute what?
How is a command used to execute something?]

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-01-03 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 






reply via email to

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