mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor: rethink doom-module-*-path functions
- Rename doom-module-path -> doom-module-expand-path, to better reflect its purpose. - Optimize doom-module-locate-path to try caches and locate-file-internal, before looping through doom-modules-dirs. - Rely on file-name-concat to join paths, rather than string concatenation. file-name-concat is more robust for the purpose and has lower overhead than expand-file-name.
This commit is contained in:
4
bin/doom
4
bin/doom
@ -295,9 +295,9 @@ SEE ALSO:
|
||||
(let ((cli-file "cli"))
|
||||
(defcli-group! "Module commands"
|
||||
(dolist (key (hash-table-keys doom-modules))
|
||||
(when-let (path (plist-get (gethash key doom-modules) :path))
|
||||
(when-let (path (doom-module-expand-path (car key) (cdr key) cli-file))
|
||||
(defcli-group! :prefix (format "+%s" (cdr key))
|
||||
(load! cli-file path t)))))
|
||||
(doom-load path t)))))
|
||||
|
||||
(load! cli-file doom-user-dir t))
|
||||
|
||||
|
Reference in New Issue
Block a user