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: Tue, 03 Jan 2023 16:59:45 +0100

>>>>> On Tue, 3 Jan 2023 15:33:21 +0000, Stefan Kangas <stefankangas@gmail.com> 
>>>>> said:

    Stefan> 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:

    Stefan> Hmm, I guess you're right.  Not sure what I was smoking:

    >> - `y-or-n-p' will append a space if there is one

*isnʼt* one, I meant. This stuff is hard :-)

    >> - it wonʼt remove one

    Stefan>     (y-or-n-p "foo")     => prompt is "foo (y or n) "
    Stefan>     (y-or-n-p "foo ")    => prompt is "foo (y or n) "

I was thinking (y-or-n-p "foo  ")    => prompt is "foo  (y or n)"

which we could consider fixing (but itʼs long-standing behaviour)

    >> - `yes-or-no-p' never modifies the passed prompt

    Stefan>     (yes-or-no-p "foo")  => prompt is "foo(yes or no) "
    Stefan>     (yes-or-no-p "foo ") => prompt is "foo (yes or no) "

    Stefan> I think the best fix here is to change `yes-or-no-p' to work the 
same
    Stefan> way as `y-or-n-p'.

ENOPATCH 😜

(and as someone pointed out elsewhere `y-or-n-p' and `yes-or-no-p'
could do with some refactoring.

Robert
-- 



reply via email to

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