Subject: Re: bug#4287: reducing emacs size by more frequent garbage-collect

From: Stefan Monnier <[email-masked]>
Date: Mon, 31 Aug 2009 10:46:32 -0400

>> Sorry, too ugly to be worth the few bytes (especially since these are
>> bytes you'll be using anyway as soon as you start Emacs).

> I've often wondered why there is no `after-load-hook' or
> `after-load-functions', run directly from (the end of) Fload. Then we
> could do now

We could replace the call from C to do-after-load-evaluation by
Frun_hooks(Qafter-load-functions), either passing it the file name
explicitly or making sure load-file-name is still set.

> which is not so easy or elegant with `after-load-alist' (whose
> regexp-matching functionality is implemented in elisp, AFAICS).

Doesn't something like (push '("" (garbage-collect)) after-load-alist)
do the trick?  Oh I see it doesn't because we check purify-flag.
Clearly this check could be removed if we use after-load-functions.

        Stefan