Don't load pkg autoloads in non-interactive sessions

Fixes an issue where autoloads would bloat load-path and auto-mode-alist
with duplicates because they were build on top of old autoloads state.

We initialize packages manually at the start of non-interactive sessions
anyway.
This commit is contained in:
Henrik Lissner 2019-07-26 20:11:05 +02:00
parent 08ba22c653
commit 38b69785dd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -514,7 +514,9 @@ to least)."
;; package autoloads file which caches `load-path', `auto-mode-alist',
;; `Info-directory-list', and `doom-disabled-packages'. A big
;; reduction in startup time.
(pkg-autoloads-p (doom-load-autoloads-file doom-package-autoload-file)))
(pkg-autoloads-p
(unless noninteractive
(doom-load-autoloads-file doom-package-autoload-file))))
(if (and core-autoloads-p (not force-p))
;; In case we want to use package.el or straight via M-x