Fix package! :disable not disabling packages
doom-disabled-packages we built either too early or too late, causing disabled packages to be loaded anyway.
This commit is contained in:
parent
05d4386409
commit
4bafe29722
1 changed files with 14 additions and 10 deletions
|
@ -83,9 +83,10 @@ missing) and shouldn't be deleted.")
|
|||
(defvar doom-packages-file (concat doom-local-dir "packages.el")
|
||||
"Where to cache `load-path' and `Info-directory-list'.")
|
||||
|
||||
(defvar doom--refreshed-p nil)
|
||||
(defvar doom--current-module nil)
|
||||
(defvar doom--init-cache-p nil)
|
||||
(defvar doom--initializing nil)
|
||||
(defvar doom--refreshed-p nil)
|
||||
(defvar generated-autoload-load-name)
|
||||
|
||||
(setq autoload-compute-prefixes nil
|
||||
|
@ -139,6 +140,7 @@ missing) and shouldn't be deleted.")
|
|||
|
||||
(defun doom--refresh-cache ()
|
||||
"TODO"
|
||||
(when doom--init-cache-p
|
||||
(doom-initialize-packages 'internal)
|
||||
(unless noninteractive
|
||||
(with-temp-buffer
|
||||
|
@ -146,7 +148,8 @@ missing) and shouldn't be deleted.")
|
|||
Info-directory-list ',Info-directory-list
|
||||
doom-disabled-packages ',doom-disabled-packages)
|
||||
(current-buffer))
|
||||
(write-file doom-packages-file))))
|
||||
(write-file doom-packages-file))
|
||||
(setq doom--init-cache-p nil))))
|
||||
|
||||
(defun doom-initialize (&optional force-p)
|
||||
"Bootstrap the bare essentials to get Doom running, if it hasn't already. If
|
||||
|
@ -195,7 +198,7 @@ FORCE-P is non-nil, do it anyway.
|
|||
(error "✕ Couldn't install %s" package)))
|
||||
(message "Installing core packages...done")))
|
||||
(cl-pushnew doom-core-dir load-path :test #'string=)
|
||||
(add-hook 'after-init-hook #'doom--refresh-cache))
|
||||
(setq doom--init-cache-p t))
|
||||
(setq doom-init-p t)))
|
||||
|
||||
(defun doom-initialize-autoloads ()
|
||||
|
@ -388,6 +391,7 @@ MODULES is an malformed plist of modules to load."
|
|||
,@(nreverse load-forms))
|
||||
,(unless doom--initializing
|
||||
'(unless noninteractive
|
||||
(doom--refresh-cache)
|
||||
(doom-initialize-modules))))))
|
||||
|
||||
(defmacro def-package! (name &rest plist)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue