emacs-devel
[Top][All Lists]
Advanced

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

Re: package--builtin-versions


From: Stefan Monnier
Subject: Re: package--builtin-versions
Date: Thu, 21 May 2015 21:41:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I stumbled into this odd little variable the other day, and I was
> wondering why it's designed the way it is.

It was the easy way to get this data uptodate and reasonably cheap.

>   (defvar package--builtin-versions
>     (eval-when-compile
>       (go-thtough-builtin-packages-and-accumulate-autoloads)))

Two problems with that:
1- you need to write go-thtough-builtin-packages-and-accumulate-autoloads,
   instead of piggy-backing on autoload.el (which benefits from the
   optimization of only looking at the files that were changed, for
   example).
2- if package.el doesn't change while some builtin package is
   upgraded/added, this var will be out-of-date.

> This should still happen at bootstrap time, so it wouldn't affect
> Emacs startup. In fact, it might help emacs startup a little bit,
> since there would be 76 fewer forms in `loaddefs.el'.

It would be nice to only define package--builtin-versions when we need
it (i.e. when package.el is loaded), but it's not super important:
package--builtin-versions is pretty small and loaddefs.el is preloaded
so its size shouldn't affect Emacs startup.


        Stefan



reply via email to

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