all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: Nonax <nonax@posteo.net>, emacs-devel@gnu.org
Subject: Re: Recursive Fload and eval-after-load forms.  (See bug #43116.)
Date: Mon, 31 Aug 2020 23:18:35 -0400	[thread overview]
Message-ID: <jwv4koitcj9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20200831194238.GC4176@ACM> (Alan Mackenzie's message of "Mon, 31 Aug 2020 19:42:38 +0000")

> 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.


        Stefan




  reply	other threads:[~2020-09-01  3:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 18:45 Recursive Fload and eval-after-load forms. (See bug #43116.) Alan Mackenzie
2020-08-31 18:54 ` Stefan Monnier
2020-08-31 19:42   ` Alan Mackenzie
2020-09-01  3:18     ` Stefan Monnier [this message]
2020-09-01 19:42       ` Alan Mackenzie
2020-09-01 23:42         ` Stefan Monnier
2020-08-31 20:27 ` Nonax
2020-08-31 20:27 ` bug#43116: " Nonax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4koitcj9.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=nonax@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.