unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7802: 24.0.50; Extraneous `mouse-3' event when do `double-mouse-3'
@ 2011-01-07 19:11 Drew Adams
  2011-01-07 19:20 ` bug#7802: bug #7802: " Drew Adams
  2011-01-08 19:50 ` grischka
  0 siblings, 2 replies; 16+ messages in thread
From: Drew Adams @ 2011-01-07 19:11 UTC (permalink / raw)
  To: 7802

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'
 






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

end of thread, other threads:[~2011-08-08 20:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 19:11 bug#7802: 24.0.50; Extraneous `mouse-3' event when do `double-mouse-3' Drew Adams
2011-01-07 19:20 ` bug#7802: bug #7802: " Drew Adams
2011-01-07 19:38   ` Drew Adams
2011-01-08  5:03     ` Stefan Monnier
2011-01-08  6:36       ` Drew Adams
2011-01-08 16:01         ` Jason Rumney
2011-01-08 17:22           ` Drew Adams
2011-01-09  3:34             ` Jason Rumney
2011-01-09 14:18               ` Drew Adams
2011-01-13  5:35               ` Chong Yidong
2011-01-13  7:15                 ` Drew Adams
2011-01-15  3:29                   ` Chong Yidong
2011-08-08 18:45                     ` Drew Adams
2011-08-08 20:52                       ` Chong Yidong
2011-01-13 17:32                 ` Stefan Monnier
2011-01-08 19:50 ` grischka

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).