emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Bug in y-or-n-p?


From: Drew Adams
Subject: RE: Bug in y-or-n-p?
Date: Wed, 22 Jun 2005 10:00:58 -0700

           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)'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]