pr fix autoload generation recursion error#953
Open
matsl wants to merge 2 commits into
Open
Conversation
* hload-path.el: Only generate and load autoloads when interactive
Add declare-function and defvar declarations so each el-file can be byte compiled without requiring the autoloads to be loaded.
Owner
|
The hload-path autoload generation is from long ago as is that whole setup when Emacs could not find its own executable directory.Are you saying that the PR has all the defs needed to work if there are no autoloads? If so, we should be able to go with this.-- BobOn May 13, 2026, at 5:54 PM, Mats Lidell ***@***.***> wrote:
@matsl requested your review on: rswgnu/hyperbole#953 pr fix autoload generation recursion error.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because your review was requested.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Do not load and generate autoloads from hload-path while in batch
processing (such as byte compiling).
Why
When generating autoloads in Emacs 31 we get this error below. It does
not occur with older versions.
The recursive load seems to origin from hload-path.el having a call to
check if autoloads are generated and if not generate and load them.
This PR tries to solve this by limiting the generation and loading of
autoloads to an interactive Emacs.
Further, the byte compile errors that occurs due to not loading
autoloads are resolved by adding declare-function and defvar. Each
el-file is by that possible to compile without having to load the
autoloads.
Note
I though this was a good experiment for solving the loaddefs-gen issue
by decoupling byte compilation from autoloads generation.
It also brought my attention to that we generate autoloads from
hload-path which feels a bit odd. I mean for normal use the autoloads
are generated by the package manager or, when running from source, by our
make target. Anyway this PR does not change that. An interactive Emacs
behaves the same.