Fix featurep! in private submodules
You'll have to use the full form to use featurep! in the private module root, but now the short form will work in the nested submodules.
This commit is contained in:
parent
800f8c4739
commit
0e6540fb8f
1 changed files with 7 additions and 4 deletions
|
@ -232,10 +232,13 @@ This aggressively reloads core autoload files."
|
||||||
|
|
||||||
(defun doom-module-from-path (path)
|
(defun doom-module-from-path (path)
|
||||||
"Get module cons cell (MODULE . SUBMODULE) for PATH, if possible."
|
"Get module cons cell (MODULE . SUBMODULE) for PATH, if possible."
|
||||||
(when-let* ((path (file-relative-name (file-truename path) (file-truename doom-modules-dir))))
|
(save-match-data
|
||||||
(let ((segments (split-string path "/")))
|
(setq path (file-truename path))
|
||||||
(cons (intern (concat ":" (car segments)))
|
(when (string-match "/modules/\\([^/]+\\)/\\([^/]+\\)/.*$" path)
|
||||||
(intern (cadr segments))))))
|
(when-let* ((module (match-string 1 path))
|
||||||
|
(submodule (match-string 2 path)))
|
||||||
|
(cons (intern (concat ":" module))
|
||||||
|
(intern submodule))))))
|
||||||
|
|
||||||
(defun doom-module-paths (&optional append-file)
|
(defun doom-module-paths (&optional append-file)
|
||||||
"Returns a list of absolute file paths to activated modules, with APPEND-FILE
|
"Returns a list of absolute file paths to activated modules, with APPEND-FILE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue