Optimize doom-initialize-packages for cold startup

This commit is contained in:
Henrik Lissner 2018-03-28 00:52:45 -04:00
parent 0e1b2453aa
commit 26514e2834
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -254,19 +254,20 @@ them."
if (file-exists-p path)
do (_load path)))
;; `package-alist'
(when (or (eq force-p t) (not (bound-and-true-p package-alist)))
(setq load-path doom-site-load-path)
(require 'package)
(setq package-activated-list nil)
(package-initialize))
(unless (eq force-p 'internal)
;; `package-alist'
(when (or force-p (not (bound-and-true-p package-alist)))
(setq load-path doom-site-load-path)
(require 'package)
(setq package-activated-list nil)
(package-initialize))
;; `quelpa-cache'
(when (or (eq force-p t) (not (bound-and-true-p quelpa-cache)))
(require 'quelpa)
(setq quelpa-initialized-p nil)
(or (quelpa-setup-p)
(error "Could not initialize quelpa"))))))
;; `quelpa-cache'
(when (or force-p (not (bound-and-true-p quelpa-cache)))
(require 'quelpa)
(setq quelpa-initialized-p nil)
(or (quelpa-setup-p)
(error "Could not initialize quelpa")))))))
;;