[Top][All Lists]

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

Re: Recursive Fload and eval-after-load forms. (See bug #43116.)

From: Stefan Monnier
Subject: Re: Recursive Fload and eval-after-load forms. (See bug #43116.)
Date: Mon, 31 Aug 2020 23:18:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Fload bails out with an error if the nesting of files it's loading has
> a file more than three times in the stack.

Indeed, we know that recursive loads do exist and don't always end up
inf-looping, so we only signal an infinite recursive load when it looks
*really* bad ;-)

> Maybe instead we could modify custom-menu-create such that it will only
> require its target file if that file isn't currently being loaded.

We could try that.  Or we could make it return a dynamic menu whose
content is only computed when the menu is actually displayed.

> If it is currently being loaded, then we only include the customisable
> variables that have already been defined.  This shouldn't be too much
> of a hardship, since custom variables tend to be defined near the
> start of a .el file, and the higher level functions which create the
> custom menu tend to be nearer the end of the file.
> What do you think?

According to `grep` it would be good enough for the 3 use cases we have
bundled with Emacs.


reply via email to

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