[Top][All Lists]

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

Re: /srv/bzr/emacs/trunk r102775: Allow format args for y-or-n-p and yes

From: Katsumi Yamaoka
Subject: Re: /srv/bzr/emacs/trunk r102775: Allow format args for y-or-n-p and yes-or-no-p.
Date: Thu, 13 Jan 2011 23:27:55 +0900
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

>   * lisp/subr.el (y-or-n-p): Accept format string args.
>   * src/fns.c (Fyes_or_no_p): Accept format string args.

So, how do we write a Lisp source program that is for various
Emacs versions, and that uses `y-or-n-p' or `yes-or-no-p' like
the following?  (Please try evaluating it.)

(y-or-n-p "Is it 100% ok? ")

It's no more than an example; a prompt string may be the one that
a fickle program generates.

(y-or-n-p "Is it 100%% ok? ")

is not a solution because it's bad for Emacs 23 and earlier (and
XEmacs).  Taiji Can reported in the wl list that Wanderlust causes
an error recently as follows:

> Debugger entered--Lisp error: (error "Not enough arguments for format string")
>   y-or-n-p("Execute marks in %INBOX:username/address@hidden:143!!? (answer 
> \"n\" to discard them) ")

Where "%INBOX:..." is a mail folder name that Wanderlust uses.
I think we can't help reverting it.


reply via email to

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