From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: yes-or-no-p prompt conditionally broken in master? Date: Fri, 4 Sep 2015 07:42:55 -0700 (PDT) Message-ID: <0999bd2e-6161-417b-afd8-867cdb0ee228@default> References: <83k2s7a247.fsf@gnu.org> <55E88336.5060703@yandex.ru> <83h9nb9z5l.fsf@gnu.org> <55E8879B.9050107@yandex.ru> <83fv2v9y9z.fsf@gnu.org> <57355235-9af7-49fb-81b5-93182cfc9d49@default> <83a8t39x3t.fsf@gnu.org> <83zj128slp.fsf@gnu.org> <87k2s6o7qh.fsf@igel.home> <83wpw68j2n.fsf@gnu.org> <871teenysf.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441378214 1407 80.91.229.3 (4 Sep 2015 14:50:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2015 14:50:14 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, bruce.connor.am@gmail.com, dgutov@yandex.ru To: Kaushal Modi , Andreas Schwab , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 04 16:50:01 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZXsJQ-0006Yo-83 for ged-emacs-devel@m.gmane.org; Fri, 04 Sep 2015 16:49:56 +0200 Original-Received: from localhost ([::1]:60254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsJQ-0001A0-47 for ged-emacs-devel@m.gmane.org; Fri, 04 Sep 2015 10:49:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsCr-0007E2-Pa for emacs-devel@gnu.org; Fri, 04 Sep 2015 10:43:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXsCq-0005tZ-Nw for emacs-devel@gnu.org; Fri, 04 Sep 2015 10:43:09 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:33948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsCl-0005oc-4K; Fri, 04 Sep 2015 10:43:03 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t84Eh0nY030186 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Sep 2015 14:43:00 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t84EgxBY009987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 4 Sep 2015 14:43:00 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t84EgvR5030205; Fri, 4 Sep 2015 14:42:57 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189593 Archived-At: > That's awesome! So I believe it will be something like this? >=20 > (defcustom yes-or-no-quick nil) >=20 > ;; yes-or-no-p now implemented in elisp instead of C > (defun yes-or-no-p (prompt) > =C2=A0 (if yes-or-no-p-quick > =C2=A0 =C2=A0 =C2=A0 (progn > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; y-or-n-p implementation > =C2=A0 =C2=A0 =C2=A0 =C2=A0) > =C2=A0 =C2=A0 =C2=A0(progn > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; legacy yes-or-no-p implementation > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ))) >=20 > ;; y-or-n-p redefined > (defun y-or-n-p (prompt) > =C2=A0 (let ((yes-or-no-quick t)) > =C2=A0 =C2=A0 =C2=A0(yes-or-no-p prompt))) Certainly not. Although Eli expressed himself very poorly in his proposal, I don't think that is what he meant (I certainly hope not). Presumably the defcustom would allow at least 3 possibilities: 1. Always use the traditional y-or-n-p behavior. 2. Always use the traditional yes-or-no-p behavior. 3. Always respect whichever behavior is expressed in the call. #3 would be equivalent to the out-of-the-box behavior today. With #3 the behavior in one code context could be like y-or-n-p and in a different context it could be like yes-or-no-p. At least this is what I hope he meant. What he actually said can, however, give the impression that only possibilites #1 and #2 would exist. I cannot believe that is what he meant, given his other posts about Emacs carefully judging which behavior to code in any given context. On Fri, Sep 4, 2015 at 8:40 AM Andreas Schwab wrote= : Eli Zaretskii writes: >> From: Andreas Schwab >> Cc: bruce.connor.am@gmail.com,=C2=A0 kaushal.modi@gmail.com,=C2=A0 dguto= v@yandex.ru,=C2=A0 monnier@iro.umontreal.ca,=C2=A0 drew.adams@oracle.com,= =C2=A0 emacs-devel@gnu.org >> Date: Fri, 04 Sep 2015 11:26:46 +0200 >> >> Eli Zaretskii writes: >> >> > Any objections to removing yes-or-no-p (with a defalias for backward >> > compatibility, of course) and making y-or-n-p serve both duties, >> > controlled by some defcustom? >> >> That doesn't make sense.=C2=A0 They implement different intented meaning= . > > Sorry, I lost you: what different meaning is that? (elisp) Yes-or-No Queries Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756=C2=A0 01D3 44D5 214B 8276 = 4ED5 "And now for something completely different."