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: Jean Louis
Subject: Re: master 7f53446: Doc fix for y-or-n-p; trailing space is no longer needed
Date: Wed, 4 Jan 2023 11:43:41 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* 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'.

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

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



-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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