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:
parent
a67b212b99
commit
775ee2f04a
4 changed files with 28 additions and 26 deletions
|
@ -251,8 +251,8 @@ in."
|
|||
(condition-case-unless-debug ex
|
||||
(let ((doom--current-module key)
|
||||
(doom--current-flags (plist-get plist :flags))
|
||||
(doctor-file (doom-module-path (car key) (cdr key) "doctor.el"))
|
||||
(packages-file (doom-module-path (car key) (cdr key) "packages.el")))
|
||||
(doctor-file (doom-module-expand-path (car key) (cdr key) "doctor.el"))
|
||||
(packages-file (doom-module-expand-path (car key) (cdr key) "packages.el")))
|
||||
(cl-loop with doom-output-indent = 6
|
||||
for name in (let (doom-packages
|
||||
doom-disabled-packages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue