unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* What is the difference between down-mouse-3 and mouse-3
@ 2008-04-15  4:38 Ye Wenbin
  2008-04-15 14:45 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Ye Wenbin @ 2008-04-15  4:38 UTC (permalink / raw)
  To: emacs-devel

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




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

end of thread, other threads:[~2008-04-15 17:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-15  4:38 What is the difference between down-mouse-3 and mouse-3 Ye Wenbin
2008-04-15 14:45 ` Stefan Monnier
2008-04-15 15:06   ` Ye Wenbin
2008-04-15 17:37     ` Stefan Monnier

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).