From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Bug in y-or-n-p? Date: Wed, 22 Jun 2005 11:39:27 -0500 (CDT) Message-ID: <200506221639.j5MGdRj26954@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119458567 32629 80.91.229.2 (22 Jun 2005 16:42:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Jun 2005 16:42:47 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 22 18:42:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dl8Il-0000oe-Vq for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 18:42:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dl8PQ-0001wa-NA for ged-emacs-devel@m.gmane.org; Wed, 22 Jun 2005 12:49:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dl8OP-0001ae-Bs for emacs-devel@gnu.org; Wed, 22 Jun 2005 12:48:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dl8OL-0001Yu-JI for emacs-devel@gnu.org; Wed, 22 Jun 2005 12:47:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dl8OL-0001Vw-Bc for emacs-devel@gnu.org; Wed, 22 Jun 2005 12:47:57 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dl8Kh-0008Kk-SN; Wed, 22 Jun 2005 12:44:12 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j5MGewCK027571; Wed, 22 Jun 2005 11:40:58 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j5MGdRj26954; Wed, 22 Jun 2005 11:39:27 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (rms@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:39310 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39310 Richard Stallman wrote: 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. 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. Sincerely, Luc.