Only crawl autoloads from module once

If you have a private module with the same name as a built-in module,
doom-module-load-path returns two entries for that module, causing our
autoloads scanner to scan it twice.
This commit is contained in:
Henrik Lissner 2020-06-11 04:49:31 -04:00
parent 0b31c0aa36
commit 9edd4f26f3
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -239,13 +239,14 @@ those directories. The first returned path is always `doom-private-dir'."
(append (list doom-private-dir) (append (list doom-private-dir)
(if module-dirs (if module-dirs
(mapcar (lambda (m) (doom-module-locate-path (car m) (cdr m))) (mapcar (lambda (m) (doom-module-locate-path (car m) (cdr m)))
(doom-files-in (if (listp module-dirs) (delete-dups
module-dirs (doom-files-in (if (listp module-dirs)
doom-modules-dirs) module-dirs
:map #'doom-module-from-path doom-modules-dirs)
:type 'dirs :map #'doom-module-from-path
:mindepth 1 :type 'dirs
:depth 1)) :mindepth 1
:depth 1)))
(cl-loop for plist being the hash-values of doom-modules (cl-loop for plist being the hash-values of doom-modules
collect (plist-get plist :path))) collect (plist-get plist :path)))
nil)) nil))