From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Bug in y-or-n-p? Date: Wed, 22 Jun 2005 11:42:29 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119454941 20987 80.91.229.2 (22 Jun 2005 15:42:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Jun 2005 15:42:21 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 22 17:42:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dl7Ls-0000Nl-HB for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 17:41:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dl7SW-0003B1-DW for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 11:48:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dl7Oj-0000qX-Ce for emacs-devel@gnu.org; Wed, 22 Jun 2005 11:44:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dl7Og-0000oA-Jn for emacs-devel@gnu.org; Wed, 22 Jun 2005 11:44:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dl7Og-0000nN-6g for emacs-devel@gnu.org; Wed, 22 Jun 2005 11:44:14 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dl7Qx-00047z-RQ for emacs-devel@gnu.org; Wed, 22 Jun 2005 11:46:35 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Dl7Mz-0006s0-LA; Wed, 22 Jun 2005 11:42:29 -0400 Original-To: emacs-devel@gnu.org 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:39307 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39307 Can someone please debug this? From: "Drew Adams" 1. Define these: (defun foo () (y-or-n-p "foo? ")) (defun bar () (y-or-n-p "bar? ")) (setq kill-emacs-query-functions '(foo bar)) 2. Use the menu-bar File > Exit Emacs. The question "foo? " correctly appears in a popup menu y/n. 3. Respond `n' to "foo? ". 4. The question "bar? " should be asked via a popup menu also, but it appears instead in the minibuffer. That is, the user starts with the mouse and menu-bar, but he is obliged to switch mid-stream to answering with the keyboard. I think something in the C code is setting last_nonmenu_event in between the two calls to y-or-n-p. Could someone please find out what?