-(defun paths-construct-module-load-path
- (root module-directory &optional site-module-directory)
- "Construct the modules load path."
- (let* ((envvar-value (getenv "EMACSMODULEPATH"))
- (env-module-path
- (and envvar-value
- (paths-decode-directory-path envvar-value 'drop-empties)))
- (site-module-load-path
- (and site-module-directory
- (paths-find-recursive-load-path (list site-module-directory)
- paths-load-path-depth)))
- (module-load-path
- (and module-directory
- (paths-find-recursive-load-path (list module-directory)
- paths-load-path-depth))))
- (append env-module-path
- site-module-load-path
- module-load-path)))
-