[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-or-no-p.



>   * 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/clear@mailserver:143!!? (answer \"n\" to discard them) ")

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

Regards,