From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel 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 Message-ID: References: <20210916073852.6025.85941@vcs0.savannah.gnu.org> <20210916073853.B90BA20ABE@vcs0.savannah.gnu.org> <87mt6zk7v0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7642"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: Robert Pluim , emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 04 10:41:39 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pD0HC-0001kp-UM for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Jan 2023 10:41:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pD0Gi-00030S-MW; Wed, 04 Jan 2023 04:41:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD0Ge-0002zg-CJ for emacs-devel@gnu.org; Wed, 04 Jan 2023 04:41:04 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD0Gb-0006Kg-R1 for emacs-devel@gnu.org; Wed, 04 Jan 2023 04:41:03 -0500 Original-Received: from localhost ([::ffff:197.239.10.238]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D69.0000000063B549AF.00006101; Wed, 04 Jan 2023 02:41:02 -0700 Mail-Followup-To: Stefan Kangas , Robert Pluim , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302220 Archived-At: * Stefan Kangas [2023-01-03 18:35]: > Robert Pluim 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/