bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40653: 28.0.50; (fset 'yes-or-no-p 'y-or-n-p) has no effect in nativ


From: Andrea Corallo
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]