Use package-activated-list for package count

Now that this variable is cached, it should always be available.
This commit is contained in:
Henrik Lissner 2018-06-05 11:21:24 +02:00
parent d24807cc2c
commit 8124d5a893
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -149,10 +149,7 @@ they were loaded at startup.
If RETURN-P, return the message as a string instead of displaying it." If RETURN-P, return the message as a string instead of displaying it."
(funcall (if return-p #'format #'message) (funcall (if return-p #'format #'message)
"Doom loaded %s packages across %d modules in %.03fs" "Doom loaded %s packages across %d modules in %.03fs"
;; Certainly imprecise, especially where custom additions to (length package-activated-list)
;; load-path are concerned, but I don't mind a [small] margin of
;; error in the plugin count in exchange for faster startup.
(- (length load-path) (length doom-site-load-path))
(if doom-modules (hash-table-count doom-modules) 0) (if doom-modules (hash-table-count doom-modules) 0)
(or doom-init-time (or doom-init-time
(setq doom-init-time (float-time (time-subtract (current-time) before-init-time)))))) (setq doom-init-time (float-time (time-subtract (current-time) before-init-time))))))