From e411762e8cded35c46734ece416f6912e1798c34 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 15 Sep 2022 23:37:04 +0200 Subject: [PATCH] refactor: enable module whether or not it exists The doom-modules table should reflect the user's intentions, not the actual state of its modules (e.g. by omitting modules that couldn't be found at activation time). --- lisp/doom-modules.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/doom-modules.el b/lisp/doom-modules.el index 994cfd0c3..f6576da2e 100644 --- a/lisp/doom-modules.el +++ b/lisp/doom-modules.el @@ -274,11 +274,8 @@ those directories." mplist) (push (car key) mplist)) (throw 'doom-modules t)))) - (let ((path (doom-module-locate-path category module))) - (push (funcall fn category module - :flags (if (listp m) (cdr m)) - :path (if (stringp path) (file-truename path))) - results))))))) + (push (funcall fn category module :flags (if (listp m) (cdr m))) + results)))))) (when noninteractive (setq doom-inhibit-module-warnings t)) (nreverse results))) @@ -432,9 +429,12 @@ to least)." `(when noninteractive (doom-module-mplist-map (lambda (category module &rest plist) - (if (plist-member plist :path) - (apply #'doom-module-set category module plist) - (message "WARNING Couldn't find the %s %s module" category module))) + (let ((path (doom-module-locate-path category module))) + (unless path + (print! (warn "Failed to locate a '%s %s' module") category module)) + (apply #'doom-module-set category module + :path path + plist))) ,@(if (keywordp (car modules)) (list (list 'quote modules)) modules))