Fix hash-table-p errors on reloading pkg autoloads

Because doom-modules wasn't set in doom-module-path's scope.
This commit is contained in:
Henrik Lissner 2019-07-21 19:51:11 +02:00
parent cbafa6b749
commit 71ba4789ca
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -374,16 +374,17 @@ This should be run whenever your `doom!' block or update your packages."
(if (and (not force-p) (if (and (not force-p)
(file-exists-p doom-package-autoload-file) (file-exists-p doom-package-autoload-file)
(not (file-newer-than-file-p doom-elpa-dir doom-package-autoload-file)) (not (file-newer-than-file-p doom-elpa-dir doom-package-autoload-file))
(not (ignore-errors (not (cl-loop for dir in (straight--directory-files (straight--repos-dir))
(cl-loop for dir in (straight--directory-files (straight--repos-dir)) if (cl-find-if
if (cl-find-if (lambda (dir) (file-newer-than-file-p dir doom-package-autoload-file)) (lambda (dir)
(glob! (straight--repos-dir dir) "*.el")) (file-newer-than-file-p dir doom-package-autoload-file))
return t))) (doom-glob (straight--repos-dir dir) "*.el"))
(not (ignore-errors return t))
(cl-loop for key being the hash-keys of (doom-modules) (not (cl-loop with doom-modules = (doom-modules)
for path = (doom-module-path (car key) (cdr key) "packages.el") for key being the hash-keys of doom-modules
if (file-newer-than-file-p path doom-package-autoload-file) for path = (doom-module-path (car key) (cdr key) "packages.el")
return t)))) if (file-newer-than-file-p path doom-package-autoload-file)
return t)))
(ignore (ignore
(print! (success "Skipping package autoloads, they are up-to-date")) (print! (success "Skipping package autoloads, they are up-to-date"))
(doom-initialize-autoloads doom-package-autoload-file)) (doom-initialize-autoloads doom-package-autoload-file))