emacs-devel
[Top][All Lists]
Advanced

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

Re: master 7f53446: Doc fix for y-or-n-p; trailing space is no longer ne


From: Robert Pluim
Subject: Re: master 7f53446: Doc fix for y-or-n-p; trailing space is no longer needed
Date: Wed, 04 Jan 2023 11:10:19 +0100

>>>>> On Wed, 4 Jan 2023 11:43:41 +0300, Jean Louis <bugs@gnu.support> said:

    Jean> * Stefan Kangas <stefankangas@gmail.com> [2023-01-03 18:35]:
    >> Robert Pluim <rpluim@gmail.com> writes:
    >> 
    >> >>>>>> On Thu, 16 Sep 2021 03:38:53 -0400 (EDT), stefankangas@gmail.com 
(Stefan Kangas) said:
    >> >     Stefan>     * src/fns.c (Fyes_or_no_p): Doc fix to reflect that a 
trailing space
    >> >     Stefan>     is no longer needed; one is added or removed 
automatically.
    >> >
    >> > I just tested this on master, and I don始t think this is qute accurate:
    >> 
    >> Hmm, I guess you're right.  Not sure what I was smoking:
    >> 
    >> > - `y-or-n-p' will append a space if there is one
    >> > - it won始t remove one
    >> 
    >> (y-or-n-p "foo")     => prompt is "foo (y or n) "
    >> (y-or-n-p "foo ")    => prompt is "foo (y or n) "
    >> 
    >> > - `yes-or-no-p' never modifies the passed prompt
    >> 
    >> (yes-or-no-p "foo")  => prompt is "foo(yes or no) "
    >> (yes-or-no-p "foo ") => prompt is "foo (yes or no) "
    >> 
    >> I think the best fix here is to change `yes-or-no-p' to work the same
    >> way as `y-or-n-p'.

    Jean> At least one space shall be there, but please don't remove trailing
    Jean> spaces, as that is users' choice, so that following unusual example
    Jean> may work:

    Jean> (y-or-n-p "                               Are you sure?             ")

You mean 'yes-or-no-p', right? 馃樅

That始s the historical behaviour, I don始t see a strong case for
changing it (but `yes-or-no-p' should be fixed to add a space if there
isn始t one).

Robert
-- 



reply via email to

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