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: Re: What is the difference between down-mouse-3 and mouse-3 Date: Tue, 15 Apr 2008 23:06:27 +0800 Message-ID: References: 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 1208273675 8742 80.91.229.12 (15 Apr 2008 15:34:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2008 15:34:35 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 15 17:34:47 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 1Jlml7-0004d4-2J for ged-emacs-devel@m.gmane.org; Tue, 15 Apr 2008 17:07:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlmkS-00075g-Ng for ged-emacs-devel@m.gmane.org; Tue, 15 Apr 2008 11:07:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlmkP-00075N-9v for emacs-devel@gnu.org; Tue, 15 Apr 2008 11:07:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlmkN-000757-79 for emacs-devel@gnu.org; Tue, 15 Apr 2008 11:07:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlmkN-000752-2p for emacs-devel@gnu.org; Tue, 15 Apr 2008 11:06:59 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JlmkM-0002ta-NX for emacs-devel@gnu.org; Tue, 15 Apr 2008 11:06:58 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 29so2036433wff.24 for ; Tue, 15 Apr 2008 08:06:51 -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:cc:content-type:mime-version:references:content-transfer-encoding:message-id:in-reply-to:user-agent; bh=FgFsmw6zM934Ld+CFlFeth//kZc2AwuB4cW80HUWPnk=; b=PWhyiRZs9C5cMu9s2KLYGPJK4APBxLVREJFIYhh+2JbITzPkV+IOukQCRG+onl1sr4CrstWQ7zt4edUIQp7i/vslJrnWCjFuEAA60viW1qY5A7WwVdeuPT9zBa0tGlOYyAoZf9lhmEfqZIgTsL7+E6AbQOHJbqsRucATtMMkPk0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:subject:from:cc:content-type:mime-version:references:content-transfer-encoding:message-id:in-reply-to:user-agent; b=g33iej6mhu2cAhMjJi3JtcAGCJ13uOu2VYSzzWHxhBKlVlNZuXpVnSDHBltUyoSPnmA05mCag6K7pJWz06QwvKmcPTf9+/kBtoIO2a0BtOfXbRkJ6JB1JT0b9I4O0jsy2EjjyAIEB6DKRLYbntZKgIfQxm8kFOxqxBoc6HhYm80= Original-Received: by 10.142.68.20 with SMTP id q20mr1408336wfa.309.1208272011236; Tue, 15 Apr 2008 08:06:51 -0700 (PDT) Original-Received: from ywb-laptop ( [121.15.171.116]) by mx.google.com with ESMTPS id 27sm14172732wff.8.2008.04.15.08.06.48 (version=SSLv3 cipher=OTHER); Tue, 15 Apr 2008 08:06:50 -0700 (PDT) In-Reply-To: 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:95273 Archived-At: On Tue, 15 Apr 2008 22:45:52 +0800, Stefan Monnier wrote: > Don't know, it works for me (tried both with the trunk and with 22.1). > What do you mean by "does not work"? Really, I test both emacs22 (GNU Emacs 22.1.1 (i486-pc-linux-gnu, GTK+ Version 2.10.11) of 2007-11-21 on vernadsky) and emacs23(GNU Emacs 23.0.60.7 (i686-pc-linux-gnu, GTK+ Version 2.10.11) of 2008-03-29 on ywb-laptop), if bind the menu to mouse-3, the command in submenu does not called. I test as following: 1. `emacs -q' start emacs 2. in *scratch* buffer, paste 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) 3. M-x eval-buffer 4. click right mouse button, select "Sub Menu" "Previous Line", the cursor does not go to previous line, but if select "Next Line", the cursor moves. > > This said, binding it to down-mouse-3 is *much* better so you can do > "press-button, select-entry, release-button". That may be the answer. But if it is true that bind mouse menu to mouse-3 doesn't work for submenu, I think the elisp manual should emphasize this. After I figure out the problem, I only find a paragraph metion it: 22.17.2 Menus and the Mouse It's often best to use a button-down event to trigger the menu. Then the user can select a menu item by releasing the button. -- Best Regards, Ye Wenbin