From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: master 7f53446: Doc fix for y-or-n-p; trailing space is no longer needed Date: Tue, 3 Jan 2023 15:33:21 +0000 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: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11071"; mail-complaints-to="usenet@ciao.gmane.io" To: Robert Pluim , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 03 16:34:36 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 1pCjJD-0002kg-N1 for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Jan 2023 16:34:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCjIA-0003OQ-V6; Tue, 03 Jan 2023 10:33:30 -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 1pCjI6-0003NO-Sa for emacs-devel@gnu.org; Tue, 03 Jan 2023 10:33:28 -0500 Original-Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCjI3-0002Qv-53 for emacs-devel@gnu.org; Tue, 03 Jan 2023 10:33:26 -0500 Original-Received: by mail-oi1-x230.google.com with SMTP id r130so27381752oih.2 for ; Tue, 03 Jan 2023 07:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=ORbuzQ4KWiPY0IGBrDJ4VWhKTBFJ7YUeyG+N0ZjNF10=; b=MLn1QlYtBR/nM4QQe7T22LXG7y3zkQLlN01UREJaVVKncRDYSY2xGNsS1AC35XFGi/ KFQFeY8OAnWV2tfPdOQcreUsEqGdFWjEQn3S434YOyJFpSG/AAATk5qkQD84t1ibUtNn vSxFH/6IFmk+Y0H/tqQIGbTzopSe3B1xFEthdDaYt4xgactGd60tMSocHXvnAc8YHRPv SvUcj1nGjw4+cEy+ddP72tB2mu1uDosRnKi01ThssWEIU+rH+lKkEcmm/MFosqgYi0Jj O1hz6J3ucmAor+5wb80XbwMwDSdAMmPYWwStfSD5Db35DF0GgDmJNm8G9mTmy5SIw+kl 3tSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=ORbuzQ4KWiPY0IGBrDJ4VWhKTBFJ7YUeyG+N0ZjNF10=; b=r02MkhsU2q3FcRqPw+LCe33Bg8aq50KFBxZ03xwP+ObBzY9wpFWC/MdGUqaolEOySt Mlx7FjCerR+hlw9p3zGVTsP23358NnHB5Hu2JnvmJ4Y9uGFMll7x0E62bhs0v5eFSgQu QaAK5rhFDX0OPgvOvl7wDWhG5hCgdLODwPM//lOXL4NwE80ytJQyB9Pp5kYxPrF5Em3N a5MOSHtX1fly9F/cc3WWOzpy3GKI8YJRJ8cju0eQ6Ss96lKJmETlMr/aRi7i5q1DcuRq /0107VjvI7n7pPHaV+YQcTeZj4f538pmWZJjk+3HujPPKSNnNhVR7P9dyKyeh0+0d/Nm f3Sw== X-Gm-Message-State: AFqh2kqFpPkJZXPH+I8zN8yEyxNTNoM6sZaqO+zvf37g3TgSkYGQ8MBR iqq9Q0nvB7JuPxKRw9u44Yw+6Kd2Wr9YM924ysA= X-Google-Smtp-Source: AMrXdXstnsY/EdxXbEWygnSv1NoZVt/pDDXm0eUDhcxMGnWKEAXDhx6mHcGg779Cbn2L8EjNbzqYOflkMRLWUS/mx3o= X-Received: by 2002:a05:6808:1402:b0:35e:ac60:2452 with SMTP id w2-20020a056808140200b0035eac602452mr1787092oiv.92.1672760001878; Tue, 03 Jan 2023 07:33:21 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 3 Jan 2023 15:33:21 +0000 In-Reply-To: <87mt6zk7v0.fsf@gmail.com> X-Hashcash: 1:20:230103:emacs-devel@gnu.org::9JARCaU6xR0VIjOb:4uRm Received-SPF: pass client-ip=2607:f8b0:4864:20::230; envelope-from=stefankangas@gmail.com; helo=mail-oi1-x230.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:302215 Archived-At: Robert Pluim writes: >>>>>> On Thu, 16 Sep 2021 03:38:53 -0400 (EDT), stefankangas@gmail.com (St= efan Kangas) said: > Stefan> * src/fns.c (Fyes_or_no_p): Doc fix to reflect that a tra= iling space > Stefan> is no longer needed; one is added or removed automaticall= y. > > I just tested this on master, and I don=CA=BCt think this is qute accurat= e: 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=CA=BCt remove one (y-or-n-p "foo") =3D> prompt is "foo (y or n) " (y-or-n-p "foo ") =3D> prompt is "foo (y or n) " > - `yes-or-no-p' never modifies the passed prompt (yes-or-no-p "foo") =3D> prompt is "foo(yes or no) " (yes-or-no-p "foo ") =3D> 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'.