doom-module-from-path: return nil if not in a module #2107

This commit is contained in:
Henrik Lissner 2019-11-23 14:52:38 -05:00
parent 5ece51a2a6
commit d11902f313
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -186,7 +186,8 @@ If ENABLED-ONLY, return nil if the containing module isn't enabled."
(cdr doom--current-module))
doom--current-module)
doom--current-module)
(doom-module-from-path (file!)))
(ignore-errors
(doom-module-from-path (file!))))
(let* ((file-name-handler-alist nil)
(path (file-truename (or path (file!)))))
(save-match-data