From 5024b6f4fb70a8be5a6789797b0448a3461f05e5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Jan 2017 19:46:36 -0500 Subject: [PATCH] core-packages: doom/refresh-autoloads: use doom-module-path + reload doom-modules --- core/core-packages.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 046b6bd15..0f2ee5114 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -334,14 +334,17 @@ autoloaded functions in the modules you use or among the core libraries. Rerun this whenever you modify your init.el (or use `make autoloads` from the command line)." (interactive) + ;; Reload modules (don't load anything) + (setq doom-modules nil) + (let ((doom-dont-load-p t) + (noninteractive t)) + (load (concat doom-emacs-dir "init.el") nil :nomessage t)) + (let ((generated-autoload-file (concat doom-local-dir "autoloads.el")) (autoload-files (append (-flatten (mapcar (lambda (m) - (let* ((dir (f-expand (format "%s/%s" - (substring (symbol-name (car m)) 1) - (cdr m)) - doom-modules-dir)) + (let* ((dir (doom-module-path (car m) (cdr m))) (auto-dir (f-expand "autoload" dir)) (auto-file (f-expand "autoload.el" dir))) (cond ((f-directory-p auto-dir)