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:59:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>   > 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
>
> That is the right approach, but there are other places where Emacs asks
> for a one-character answer and I'd like them to go back to the old
> behavior also.
>
> Perhaps you need to do this at the level of read-char-choice.

Maybe by adding to the beginning of read-char-choice:

  (if read-char-from-minibuffer
      (read-char-from-minibuffer ...)

>                                                         and also an option
>   > to choose either to use yes-or-no-p or y-or-n-p with shorter answers.
>
> If someone wants that option I see no harm in providing it.
> Did anyone actually ask for it, or was it proposed simply in the
> search for more alternative behaviors?

Many users asked for such option for easier customization instead of
adding this unobvious setting to the init file:

  (fset 'yes-or-no-p 'y-or-n-p)



reply via email to

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