emacs-devel
[Top][All Lists]
Advanced

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

Re: Confused by y-or-n-p


From: Juri Linkov
Subject: Re: Confused by y-or-n-p
Date: Mon, 28 Dec 2020 10:48:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> This is exactly what we recently did for the function 'read-char-choice'.
>> Instead of changing its long-standing implementation that uses 'read-key',
>> we left it unchanged, and only changed its caller to rely on a different
>> function that uses the minibuffer to read a character.
>
> Do you mean 'dired-query' and 'zap-up-to-char'?

Only 'dired-query'.  'zap-up-to-char' is a different case.

>> The same way we could add a function with old implementation of 'y-or-n-p',
>> and depending on an option use either of them.  So two new options are
>> needed: to select an implementation of y-or-n-p and and also an option
>> to choose either to use yes-or-no-p or y-or-n-p with shorter answers.
>
> This would be OK I think.  With the "use the old implementation" option
> going to Emacs 27.2 and the use 'y-or-n-p' instead of 'yes-or-no-p' to
> master.
>
>> Or maybe just one variable with three choices: long answers with yes-or-no-p,
>> short answers with read-key, short answers with the minibuffer.
>
> This would probably bother both conservative and more adventurous users
> with something they'd never want.

I agree.



reply via email to

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