Subject: bug#40838: 28.0.50; [feature/native-comp] Function overrides in init.el are not honored after deferred compilation

From: Andrea Corallo <[email-masked]>
Date: Sat, 25 Apr 2020 09:16:38 +0000

Hi Ihor,

Ihor Radchenko <[email-masked]> writes:

> I redefine or patch some functions from packages in my init.el.
> However, I noticed that the default definitions can be unexpectedly
> restored.
>
> I observe the following when comp-deferred-compilation is set to 't:
>
> 1. A package that is not native-compiled is loaded on startup and the
> native-comp process is started asynchronously
> 2. Some function from the package is redefined in my init.el 
> 3. The native compilation finishes
> 4. My function definition from init.el is no longer working. The default
> version is restored.
>
> I do not think that loading .eln files should override function slots if
> they are different from what is in the original .el file.

You are 100% right, it should not (we have some specific logic for that).

I'll look into it thanks for the bug report.

  Andrea

-- 
[email-masked]