From: "Ye Wenbin" <wenbinye@gmail.com>
To: emacs-devel@gnu.org
Subject: What is the difference between down-mouse-3 and mouse-3
Date: Tue, 15 Apr 2008 12:38:47 +0800 [thread overview]
Message-ID: <op.t9mxuxzc52p72k@ywb-laptop> (raw)
I wrote try to figure out how to set up mouse menu, after spending a lot of
time to to figure out why no action preform when click submenu, I found
that
I should bind down-mouse-3 event rather than mouse-3 event. I can't find
where is the difference mentioned in elisp manual. Is there any documents
for the reason that submenu does not work for mouse-3 binding?
Here is my test code:
(define-derived-mode foo-mode text-mode "Foo"
"Test major mode"
)
(easy-menu-define foo-menu foo-mode-map "My own menu"
'("Foo"
["Next Line" next-line t]
("Sub Menu"
["Previous Line" previous-line t])))
(define-key foo-mode-map [mouse-3] 'mouse-popup-menubar-stuff)
;; (define-key foo-mode-map [down-mouse-3] 'mouse-popup-menubar-stuff)
--
Best Regards,
Ye Wenbin
next reply other threads:[~2008-04-15 4:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 4:38 Ye Wenbin [this message]
2008-04-15 14:45 ` What is the difference between down-mouse-3 and mouse-3 Stefan Monnier
2008-04-15 15:06 ` Ye Wenbin
2008-04-15 17:37 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.t9mxuxzc52p72k@ywb-laptop \
--to=wenbinye@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).