Fix doom-module-from-path on module directories

Allow PATH to be an exact path to a module.
This commit is contained in:
Henrik Lissner 2018-06-15 16:04:27 +02:00
parent 58601488d9
commit 98632fe086
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -132,7 +132,7 @@ This doesn't require modules to be enabled. For enabled modules us
(let ((path (or path (FILE!))))
(save-match-data
(setq path (file-truename path))
(when (string-match "/modules/\\([^/]+\\)/\\([^/]+\\)/.*$" path)
(when (string-match "/modules/\\([^/]+\\)/\\([^/]+\\)\\(?:/.*\\)?$" path)
(when-let* ((category (match-string 1 path))
(module (match-string 2 path)))
(cons (doom-keyword-intern category)