From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Bug in y-or-n-p? Date: Wed, 22 Jun 2005 10:00:58 -0700 Message-ID: References: <200506221639.j5MGdRj26954@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1119459592 3470 80.91.229.2 (22 Jun 2005 16:59:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Jun 2005 16:59:52 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 22 18:59:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dl8Yj-0005gj-1b for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 18:58:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dl8fN-0006cK-Qg for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 13:05:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dl8dX-0005xr-Ga for emacs-devel@gnu.org; Wed, 22 Jun 2005 13:03:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dl8dQ-0005tt-Mh for emacs-devel@gnu.org; Wed, 22 Jun 2005 13:03:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dl8dP-0005sG-Fd for emacs-devel@gnu.org; Wed, 22 Jun 2005 13:03:31 -0400 Original-Received: from [141.146.126.231] (helo=agminet04.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Dl8e5-0001gN-Mq for emacs-devel@gnu.org; Wed, 22 Jun 2005 13:04:14 -0400 Original-Received: from agminet04.oracle.com (localhost [127.0.0.1]) by agminet04.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j5MH0xWs016637 for ; Wed, 22 Jun 2005 12:00:59 -0500 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet04.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j5MH0x7k016612 for ; Wed, 22 Jun 2005 12:00:59 -0500 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j5MH0wCw005010 for ; Wed, 22 Jun 2005 11:00:58 -0600 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw300.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j5MH0wMi004999 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 22 Jun 2005 11:00:58 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <200506221639.j5MGdRj26954@raven.dms.auburn.edu> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE 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:39315 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39315 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. No, the question bar should not be asked at all if you answere `n' to foo, and in today's CVS it is not asked, at least not on GNU/Linux. If you answer `y' to foo, then bar should be asked via a popup menu, and it is, in today's CVS, at least on GNU/Linux. There is no bug. >From the kill-emacs-query-functions docstring: Functions to call with no arguments to query about killing Emacs. If any of these functions returns nil, killing Emacs is cancelled. In other words, once you answer `n' to any question, the other questions are not asked. The fact that bar was asked for Drew could have been a temporary bug In CVS which would appear to be fixed now. Unless it is operating system specific, or a local problem with Drew's setup. I'm sorry, I meant this for foo: (defun foo () (y-or-n-p "foo? ") t) ; always return `t' I'm using this version of Emacs: In GNU Emacs 22.0.50.2 (i386-mingw-nt5.1.2600) of 2005-04-16 on LAPTOP Distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)'