Add ALL-P parameter to doom-module-load-path

Allowing it to return path to *all* modules, whether or not they are
activated.
This commit is contained in:
Henrik Lissner 2018-06-12 15:03:45 +02:00
parent 6dc413c044
commit acbad5ca01
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -128,10 +128,17 @@ This doesn't require modules to be enabled. For enabled modules us
(cons (intern (concat ":" module))
(intern submodule))))))))
(defun doom-module-load-path ()
"Return a list of absolute file paths to activated modules."
(append (cl-loop for plist being the hash-values of (doom-modules)
collect (plist-get plist :path))
(defun doom-module-load-path (&optional all-p)
"Return a list of absolute file paths to activated modules. If ALL-P is
non-nil, return paths of possible modules, activated or otherwise."
(append (if all-p
(doom-files-in doom-modules-dirs
:type 'dirs
:mindepth 1
:depth 1
:full t)
(cl-loop for plist being the hash-values of (doom-modules)
collect (plist-get plist :path)))
(list doom-private-dir)))
(defun doom-modules (&optional refresh-p)