mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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:
@ -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
|
||||||
|
Reference in New Issue
Block a user