From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ye Wenbin" Newsgroups: gmane.emacs.devel Subject: What is the difference between down-mouse-3 and mouse-3 Date: Tue, 15 Apr 2008 12:38:47 +0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208234535 26855 80.91.229.12 (15 Apr 2008 04:42:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2008 04:42:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 15 06:42:39 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jld07-0008W7-23 for ged-emacs-devel@m.gmane.org; Tue, 15 Apr 2008 06:42:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlczS-00078u-Dk for ged-emacs-devel@m.gmane.org; Tue, 15 Apr 2008 00:41:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jlcwy-0004wH-5x for emacs-devel@gnu.org; Tue, 15 Apr 2008 00:39:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jlcww-0004uh-Dj for emacs-devel@gnu.org; Tue, 15 Apr 2008 00:39:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jlcww-0004uH-4F for emacs-devel@gnu.org; Tue, 15 Apr 2008 00:39:18 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.168]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jlcww-0004CM-1T for emacs-devel@gnu.org; Tue, 15 Apr 2008 00:39:18 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 29so1850237wff.24 for ; Mon, 14 Apr 2008 21:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:to:subject:from:content-type:mime-version:content-transfer-encoding:message-id:user-agent; bh=h592m96sqp2h6EbU7+QAb/cZhWAYkdv0NzbuQLnUkWE=; b=CGq9ft46KfmOSiUF6AnLU7DKtkRJKZ2UkIDx1eA8p6MCVgZIiQ8+bfXoOkmN4hZGiZn0BcaDVIODL4U1eIIYcwnVT56HT3F43o/J44WiT1rgDUuVVaxOuevWTXSufWf7e0IE/CwW0rn16pS1s+Pce2jiOdW3y9Z0wvqg43QgbbE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:subject:from:content-type:mime-version:content-transfer-encoding:message-id:user-agent; b=GmH+y7rv/nCoLHRchRcg3duaXj9gnOwPCnDjaQGDBCtDsXsM2vrNqENe0WAliFa/Eciam57Wigvy2/naYryA6rYAoOdOWsvz45rREvXPXbidAXNQb/jYn77rr49lPTDgmkQchjX0JwRdDkgZT1KFDo1uYZZQ48zxT630YXFwrW4= Original-Received: by 10.142.140.14 with SMTP id n14mr2091488wfd.192.1208234354104; Mon, 14 Apr 2008 21:39:14 -0700 (PDT) Original-Received: from ywb-laptop ( [121.15.171.116]) by mx.google.com with ESMTPS id 28sm13609558wfg.17.2008.04.14.21.39.11 (version=SSLv3 cipher=OTHER); Mon, 14 Apr 2008 21:39:13 -0700 (PDT) User-Agent: Opera Mail/9.25 (Linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95241 Archived-At: 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