From: Andrea Corallo <akrl@sdf.org>
To: Andrey Orst <andreyorst@gmail.com>
Cc: 40653@debbugs.gnu.org, luknax@sdf.org,
Stefan Monnier <monnier@iro.umontreal.ca>
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 [thread overview]
Message-ID: <xjfd087st2m.fsf@sdf.org> (raw)
In-Reply-To: <CAAKhXoY8=FLFrPes8R=LJpFx32spXdHgmOVr5PmKbSmT_Vf1=w@mail.gmail.com> (Andrey Orst's message of "Thu, 16 Apr 2020 10:59:12 +0300")
Andrey Orst <andreyorst@gmail.com> 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
next prev parent reply other threads:[~2020-04-16 9:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 7:59 bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in native-comp branch Andrey Orst
2020-04-16 8:18 ` Eli Zaretskii
2020-04-16 8:21 ` Andrey Orst
2020-04-16 8:51 ` Eli Zaretskii
2020-04-16 9:01 ` Andrea Corallo [this message]
2020-04-16 9:58 ` Andrey Orst
2020-04-16 16:49 ` Andrea Corallo
2020-04-16 22:14 ` Sebastian Sturm
2020-04-17 11:26 ` Andrea Corallo
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=xjfd087st2m.fsf@sdf.org \
--to=akrl@sdf.org \
--cc=40653@debbugs.gnu.org \
--cc=andreyorst@gmail.com \
--cc=luknax@sdf.org \
--cc=monnier@iro.umontreal.ca \
/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).