From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#447: last-nonmenu-event and sub-menus Date: Wed, 08 Oct 2008 18:41:45 -0400 Message-ID: <8763o2yaja.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 447@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223506216 16330 80.91.229.12 (8 Oct 2008 22:50:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2008 22:50:16 +0000 (UTC) Cc: 447@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 00:51:13 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Knhs8-0007X7-J7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 00:51:12 +0200 Original-Received: from localhost ([127.0.0.1]:35871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knhr5-0008HM-15 for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 18:50:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Knhr0-0008Gj-Hd for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 18:50:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Knhqy-0008GL-Fy for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 18:50:01 -0400 Original-Received: from [199.232.76.173] (port=60515 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knhqy-0008GG-6s for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 18:50:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:50669) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Knhqy-0005Ub-1k for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 18:50:00 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m98MnvuF013841; Wed, 8 Oct 2008 15:49:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m98Mj292012668; Wed, 8 Oct 2008 15:45:02 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 08 Oct 2008 22:45:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 447 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 447-submit@emacsbugs.donarmstrong.com id=B447.122350560511656 (code B ref 447); Wed, 08 Oct 2008 22:45:02 +0000 Original-Received: (at 447) by emacsbugs.donarmstrong.com; 8 Oct 2008 22:40:05 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m98Me2S6011479 for <447@emacsbugs.donarmstrong.com>; Wed, 8 Oct 2008 15:40:03 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 7E32A57E218; Wed, 8 Oct 2008 18:41:45 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 08 Oct 2008 18:50:01 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21298 Archived-At: > last-nonmenu-event returns a bad value when submenus are involved. > This applies to 22.2 and the current CVS. As an example: > > emacs -Q > > ;; Evaluate this code: > (defun bar () > (interactive) > (message "%s :: %s" last-nonmenu-event > (posn-window (event-start last-nonmenu-event))) > (sit-for 5)) > (global-set-key > [down-mouse-2] > '(menu-item "foo" > (keymap "foo" > (bar menu-item "bar" bar) > (submenu menu-item "submenu" > (keymap "submenu" (bar menu-item "bar" bar)))))) > C-x 2 > Put "scratch" in one window, "messages" in the other. > Select "messages" window. > Move mouse over "scratch", but do not select it. > Press mouse-2, and select the "bar" menu-item. > > When called from the submenu, `bar' returns a bad result: > > bar :: # > > The window is wrong, etc. Hi Glenn, I can't seem to reproduce this now, using the latest Emacs CVS. Maybe it's been fixed in the meantime. Do you still see this behavior?