From c760b33212ed5ee531b45f90a386cde96fce7394 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 14 Mar 2018 21:21:58 -0400 Subject: [PATCH] Fix recursive load errors when an enabled module doesn't exist --- core/core-packages.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 8151a85ce..d6bfea435 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -362,10 +362,11 @@ MODULES is an malformed plist of modules to load." ((let ((submodule (if (listp m) (car m) m)) (flags (if (listp m) (cdr m)))) (let ((path (doom-module-find-path module submodule))) - (doom-module-set module submodule :flags flags :path path) - (push `(let ((doom--current-module ',(cons module submodule))) - (load! init ,path t)) - load-forms)))))) + (when path + (doom-module-set module submodule :flags flags :path path) + (push `(let ((doom--current-module ',(cons module submodule))) + (load! init ,path t)) + load-forms))))))) `(let (file-name-handler-alist) (setq doom-modules ',doom-modules) (let ((doom--initializing t))