unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Robert Pluim <rpluim@gmail.com>, emacs-devel@gnu.org
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	[thread overview]
Message-ID: <Y7U8PQR4dJpJZEai@protected.localdomain> (raw)
In-Reply-To: <CADwFkm=+VyND-TKDhWCopYe=JjZVxQsDCFQh-c3h1Q71u0EJfg@mail.gmail.com>

* 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/



  parent reply	other threads:[~2023-01-04  8:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210916073852.6025.85941@vcs0.savannah.gnu.org>
     [not found] ` <20210916073853.B90BA20ABE@vcs0.savannah.gnu.org>
2023-01-03 14:31   ` master 7f53446: Doc fix for y-or-n-p; trailing space is no longer needed Robert Pluim
2023-01-03 15:33     ` Stefan Kangas
2023-01-03 15:59       ` Robert Pluim
2023-01-04  8:43       ` Jean Louis [this message]
2023-01-04 10:10         ` Robert Pluim
2023-01-04 15:53           ` [External] : " Drew Adams
2023-01-04 16:07             ` Robert Pluim
2023-01-04 16:12               ` Drew Adams
2023-01-04 16:14                 ` Robert Pluim
2023-01-04 17:31               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7U8PQR4dJpJZEai@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@gmail.com \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).