emacs-devel
[Top][All Lists]
Advanced

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

Re: Summary and next steps for (package-initialize)


From: Eli Zaretskii
Subject: Re: Summary and next steps for (package-initialize)
Date: Mon, 21 Aug 2017 19:35:37 +0300

> From: Radon Rosborough <address@hidden>
> Date: Sun, 20 Aug 2017 10:54:30 -0700
> Cc: address@hidden
> 
> The current (package-initialize) loads the autoload files for all
> installed packages (or just a subset, if `package-load-list' was
> modified). It also adds those packages' directories to the load-path.
> At least this is my understanding.
> 
> You suggested continuing to do these operations after loading the
> init-file, but also to
> 
> > add another call at a proper place in startup.el to do whatever
> > needs to be done before the user init file is processed.
> 
> Please explain what exactly needs to be done before the user init-file
> is processed, and how doing this would allow both package.el
> configuration and package configuration in the init-file without the
> prescence of an explicit (package-initialize) call.

AFAIU, packages need to be loaded before we run this fragment:

  ;; Re-evaluate predefined variables whose initial value depends on
  ;; the runtime context.
  (mapc 'custom-reevaluate-setting
        ;; Initialize them in the same order they were loaded, in case there
        ;; are dependencies between them.
        (prog1 (nreverse custom-delayed-init-variables)
          (setq custom-delayed-init-variables nil)))

This is so the defcustom's in the loaded packages are known to Emacs
when the init file is loaded.  So my proposal is to call some
package.el function that would do that before that.



reply via email to

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