Function: package-activate-all

package-activate-all is a byte-compiled function defined in package.el.gz.

Signature

(package-activate-all)

Documentation

Activate all installed packages.

The variable package-load-list controls which packages to load.

View in manual

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(progn ;; Make the function usable without loading `package.el'.
(defun package-activate-all ()
  "Activate all installed packages.
The variable `package-load-list' controls which packages to load."
  (setq package--activated t)
  (let* ((elc (concat package-quickstart-file "c"))
         (qs (if (file-readable-p elc) elc
               (if (file-readable-p package-quickstart-file)
                   package-quickstart-file))))
    ;; The quickstart file presumes that it has a blank slate,
    ;; so don't use it if we already activated some packages.
    (or (and qs (not (bound-and-true-p package-activated-list))
             ;; Skip `load-source-file-function' which would slow us down by
             ;; a factor 2 when loading the .el file (this assumes we were
             ;; careful to save this file so it doesn't need any decoding).
             (with-demoted-errors "Error during quickstart: %S"
               (let ((load-source-file-function nil))
                 (unless (boundp 'package-activated-list)
                   (setq package-activated-list nil))
                 (load qs nil 'nomessage)
                 t)))
        (progn
          (require 'package)
          ;; Silence the "unknown function" warning when this is compiled
          ;; inside `loaddefs.el'.
          ;; FIXME: We use `with-no-warnings' because the effect of
          ;; `declare-function' is currently not scoped, so if we use
          ;; it here, we end up with a redefinition warning instead :-)
          (with-no-warnings
            (package--activate-all))))))