diff --git a/core/core-packages.el b/core/core-packages.el index f1125e71e..f3af04a70 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -266,10 +266,10 @@ the commandline." (setq autoload-files (append (-flatten (--map (let ((auto-dir (f-expand "autoload" it)) (auto-file (f-expand "autoload.el" it))) - (cond ((f-directory-p auto-dir) - (f-glob "*.el" auto-dir)) - ((f-exists-p auto-file) - auto-file))) + (append (and (f-exists-p auto-file) + (list auto-file)) + (and (f-directory-p auto-dir) + (f-glob "*.el" auto-dir)))) (--map (doom-module-path (car it) (cdr it)) doom-modules))) (f-glob "autoload/*.el" doom-core-dir)))