[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43089: [feature/native-comp] eval-after-load against files loaded fr
From: |
Jim Myhrberg |
Subject: |
bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089 |
Date: |
Mon, 31 Aug 2020 23:12:16 +0100 |
Hi,
I believe the fix for bug#43089 (commit 87b9c3e) has caused some
issues with eval-after-load. For me at least smartparens'
"(eval-after-load 'ruby-mode ...)" no longer fires if ruby-mode is
loaded from a *.eln file. Trashing the cached "ruby-mode-*.eln" file
before starting emacs, makes eval-after-load work again until next
restart when the *.eln is in place again.
I've nailed down the issue to commit 87b9c3e, as it does not occur
with a build from the commit right before it (38b0ead).
For reference, I'm on macOS 10.15.6 / GCC 10.2.0, and I build Emacs
with a custom script: https://github.com/jimeh/build-emacs-for-macos
To easily reproduce the issue I've stripped down my config to a hacky
bare minimum config that reproduces the issue, available here:
https://gist.github.com/jimeh/a7f2fe730f15baec9f8157fe46d1119b
When first launching Emacs with the above config, opening a *.rb file
loads smartparens-ruby through a "(eval-after-load 'ruby-mode ...)" in
smartparens-config.el. Once everything has natively compiled and you
restart emacs, the eval-after-load does not fire when opening a ruby
file, and smartparens-ruby is not loaded when ruby-mode is loaded. And
as I said at the top, deleting the cached ruby-mode-*.eln file
resolves the issue and lets the eval-after-load hook run again, at
least until you restart emacs with the *.eln in place.
It also seems to matter if with-eval-after-load/eval-after-load is
called from within a natively compiled file or not. Cause adding the
snippet below to init.el which is not natively compiled, does fire the
eval-after-load message but not with-eval-after-load. While within the
natively compiled smartparens-config.el it does not fire
eval-after-load.
(with-eval-after-load 'ruby-mode
(message "msg via with-eval-after-load ruby-mode"))
(eval-after-load 'ruby-mode
(message "msg via eval-after-load ruby-mode"))
- bug#43089: [feature/native-comp] eval-after-load against files loaded from *.eln doesn't work after fix for bug#43089,
Jim Myhrberg <=