core-packages: general, minor refactor
This commit is contained in:
parent
883c12f860
commit
efc7ec38ae
1 changed files with 12 additions and 12 deletions
|
@ -276,15 +276,14 @@ is sorted by order of insertion unless ALL-P is non-nil. If ALL-P is non-nil,
|
||||||
include all modules, enabled or otherwise."
|
include all modules, enabled or otherwise."
|
||||||
(unless (hash-table-p doom-modules)
|
(unless (hash-table-p doom-modules)
|
||||||
(error "doom-modules is uninitialized"))
|
(error "doom-modules is uninitialized"))
|
||||||
(cl-loop for key being the hash-keys of doom-modules
|
(hash-table-keys doom-modules))
|
||||||
collect key))
|
|
||||||
|
|
||||||
(defun doom-packages--display-benchmark ()
|
(defun doom-packages--display-benchmark ()
|
||||||
(message "Doom loaded %s packages across %d modules in %.03fs"
|
(message "Doom loaded %s packages across %d modules in %.03fs"
|
||||||
;; Certainly imprecise, especially where custom additions to
|
;; Certainly imprecise, especially where custom additions to
|
||||||
;; load-path are concerned, but I don't mind a [small] margin of
|
;; load-path are concerned, but I don't mind a [small] margin of
|
||||||
;; error in the plugin count in exchange for faster startup.
|
;; error in the plugin count in exchange for faster startup.
|
||||||
(- (length load-path) (length doom--base-load-path))
|
(length doom--package-load-path)
|
||||||
(hash-table-size doom-modules)
|
(hash-table-size doom-modules)
|
||||||
(setq doom-init-time (float-time (time-subtract after-init-time before-init-time)))))
|
(setq doom-init-time (float-time (time-subtract after-init-time before-init-time)))))
|
||||||
|
|
||||||
|
@ -514,13 +513,13 @@ call `doom/reload-load-path' remotely (through emacsclient)."
|
||||||
(interactive)
|
(interactive)
|
||||||
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t)
|
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t)
|
||||||
(cond (noninteractive
|
(cond (noninteractive
|
||||||
(message "Reloading...")
|
|
||||||
(require 'server)
|
(require 'server)
|
||||||
(when (server-running-p)
|
(when (server-running-p)
|
||||||
|
(message "Reloading active Emacs session...")
|
||||||
(server-eval-at server-name '(doom//reload-load-path))))
|
(server-eval-at server-name '(doom//reload-load-path))))
|
||||||
(t
|
(t
|
||||||
(doom-initialize-load-path t)
|
(doom-initialize-load-path t)
|
||||||
(message "Reloaded %d packages" (length doom--package-load-path))
|
(message "%d packages reloaded" (length doom--package-load-path))
|
||||||
(run-with-timer 1 nil #'redraw-display)
|
(run-with-timer 1 nil #'redraw-display)
|
||||||
(run-hooks 'doom-reload-hook))))
|
(run-hooks 'doom-reload-hook))))
|
||||||
|
|
||||||
|
@ -558,7 +557,8 @@ This should be run whenever init.el or an autoload file is modified. Running
|
||||||
(delete-file doom-autoload-file)
|
(delete-file doom-autoload-file)
|
||||||
(message "Deleted old autoloads.el"))
|
(message "Deleted old autoloads.el"))
|
||||||
(dolist (file (reverse targets))
|
(dolist (file (reverse targets))
|
||||||
(message (cond ((not (doom-packages--read-if-cookies file))
|
(message
|
||||||
|
(cond ((not (doom-packages--read-if-cookies file))
|
||||||
"⚠ Ignoring %s")
|
"⚠ Ignoring %s")
|
||||||
((update-file-autoloads file nil doom-autoload-file)
|
((update-file-autoloads file nil doom-autoload-file)
|
||||||
"✕ Nothing in %s")
|
"✕ Nothing in %s")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue