From 9edd4f26f39fc1632d63aebd156ab028d222e733 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 11 Jun 2020 04:49:31 -0400 Subject: [PATCH] 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. --- core/core-modules.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index 54b51154a..a88a9dfdd 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -239,13 +239,14 @@ those directories. The first returned path is always `doom-private-dir'." (append (list doom-private-dir) (if module-dirs (mapcar (lambda (m) (doom-module-locate-path (car m) (cdr m))) - (doom-files-in (if (listp module-dirs) - module-dirs - doom-modules-dirs) - :map #'doom-module-from-path - :type 'dirs - :mindepth 1 - :depth 1)) + (delete-dups + (doom-files-in (if (listp module-dirs) + module-dirs + doom-modules-dirs) + :map #'doom-module-from-path + :type 'dirs + :mindepth 1 + :depth 1))) (cl-loop for plist being the hash-values of doom-modules collect (plist-get plist :path))) nil))