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: Drew Adams
Subject: RE: Summary and next steps for (package-initialize)
Date: Thu, 24 Aug 2017 14:40:39 -0700 (PDT)

> I just double checked to make sure :) package-initialize does this:
> 
>
>   (unless no-activate
>     (dolist (elt package-alist)
>       (package-activate (car elt))))
>
> 
> Then package-activate calls package-activate-1,
>                 which calls package--load-files-for-activation,
>                 which calls package--activate-autoloads-and-load-path and
> calls `load' on all package files that were *already loaded*
>                 which is this:
> 
>   (defun package--activate-autoloads-and-load-path (pkg-desc)
>     "Load the autoloads file and add package dir to `load-path'.
>   PKG-DESC is a `package-desc' object."
>   …)
> 
> SUmmarizing, package-initialize sets up the loadpath to include directories
> of all installed packages, and loads their autoload files.  Additionally, it
> reloads any already loaded (or `require'd) package file (it checks load-
> history for that):
> 
>     ;; Call `load' on all files in `package-desc-dir' already present in
>     ;; `load-history'.  This is done so that macros in these files are updated
>     ;; to their new definitions.  If another package is being installed which
>     ;; depends on this new definition, not doing this update would cause
>     ;; compilation errors and break the installation.

That sounds reasonable.  Thx.



reply via email to

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