From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch Date: Thu, 16 Apr 2020 09:01:05 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="104601"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 40653@debbugs.gnu.org, luknax@sdf.org, Stefan Monnier To: Andrey Orst Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 16 11:02:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jP0PW-000R3e-I2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Apr 2020 11:02:14 +0200 Original-Received: from localhost ([::1]:59540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jP0PV-0008Tf-IM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Apr 2020 05:02:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jP0PM-0008R6-Ho for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 05:02:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jP0PL-0000QU-HG for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 05:02:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54222) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jP0PL-0000PM-EE for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 05:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jP0PK-0003ab-34 for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2020 05:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Apr 2020 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40653 X-GNU-PR-Package: emacs Original-Received: via spool by 40653-submit@debbugs.gnu.org id=B40653.158702767113740 (code B ref 40653); Thu, 16 Apr 2020 09:02:02 +0000 Original-Received: (at 40653) by debbugs.gnu.org; 16 Apr 2020 09:01:11 +0000 Original-Received: from localhost ([127.0.0.1]:37535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jP0OV-0003ZY-7G for submit@debbugs.gnu.org; Thu, 16 Apr 2020 05:01:11 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:56011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jP0OQ-0003ZN-R9 for 40653@debbugs.gnu.org; Thu, 16 Apr 2020 05:01:09 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 03G915PY001696 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 16 Apr 2020 09:01:06 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 03G915cA019781; Thu, 16 Apr 2020 09:01:05 GMT In-Reply-To: (Andrey Orst's message of "Thu, 16 Apr 2020 10:59:12 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178437 Archived-At: Andrey Orst writes: > Call `emacs -q` do `M-x ansi-term RET` try to kill buffer - a prompt > with `yes` or `no` will be provided. Cancel and call `M-: (fset > 'yes-or-no-p 'y-or-n-p) RET`, and try to kill ansi-term buffer > again. Prompt will still ask to input `yes` or `no` instead of `y` or > `n`. Works in master branch of Emacs run with `-q`. Hi Andrey, The issue is that here we are shadowing with an alias a primitive C subr. Compiling speed 2 the assumption is that these are not redefined or advised (the manual warns about doing that). Function calls to C primitives at speed 2 are hardcoded for performance reasons in the generated code. We have a customize listing exceptions for that `comp-never-optimize-functions'. You should solve the issue adding `yes-or-no-p' to this customize and recompiling. Now what I'm not sure of is if we want to add `yes-or-no-p' by default there given that `yes-or-no-p' is never perf critical. The only issue I see is that could be the first exception of many. On the other hand customizing `comp-never-optimize-functions' will solve the issue only for external packages because you likely already have compiled the whole Emacs with the default setting... So yeah I think we should probably add `yes-or-no-p' to `comp-never-optimize-functions' and accept that we will probably end-up with few other ecceptions :/ Opinions on this are welcome. Andrea -- akrl@sdf.org