Function: package--load-files-for-activation
package--load-files-for-activation is a byte-compiled function defined
in package.el.gz.
Signature
(package--load-files-for-activation PKG-DESC RELOAD)
Documentation
Load files for activating a package given by PKG-DESC.
Load the autoloads file, and ensure load-path is setup. If
RELOAD is non-nil, also load all files in the package that
correspond to previously loaded files.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defun package--load-files-for-activation (pkg-desc reload)
"Load files for activating a package given by PKG-DESC.
Load the autoloads file, and ensure `load-path' is setup. If
RELOAD is non-nil, also load all files in the package that
correspond to previously loaded files."
(let* ((loaded-files-list
(when reload
(package--list-loaded-files (package-desc-dir pkg-desc)))))
;; Add to load path, add autoloads, and activate the package.
(package--activate-autoloads-and-load-path pkg-desc)
;; 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.
(with-demoted-errors "Error in package--load-files-for-activation: %s"
(mapc (lambda (feature) (load feature nil t))
;; Skip autoloads file since we already evaluated it above.
(remove (file-truename (package--autoloads-file-name pkg-desc))
loaded-files-list)))))