From 9cbc173e0dbd96c1d8ed62a020bafb666af73c3f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 16 Sep 2022 03:11:40 +0200 Subject: [PATCH] fix(lib): update doom/reload-autoloads To reflect recent changes (particularly b914830). Amend: b91483040363 --- lisp/lib/config.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/lib/config.el b/lisp/lib/config.el index b1238bfc8..8a0babb94 100644 --- a/lisp/lib/config.el +++ b/lisp/lib/config.el @@ -99,7 +99,7 @@ Runs `doom-after-reload-hook' afterwards." ;;;###autoload (defun doom/reload-autoloads () - "Reload only `doom-autoloads-file' and `doom-package-autoload-file'. + "Reload only the autoloads of the current profile. This is much faster and safer than `doom/reload', but not as comprehensive. This reloads your package and module visibility, but does not install new packages or @@ -108,7 +108,12 @@ remove orphaned ones. It also doesn't reload your private config. It is useful to only pull in changes performed by 'doom sync' on the command line." (interactive) - (load (file-name-sans-extension doom-autoloads-file) nil 'nomessage)) + (require 'doom-profiles) + ;; TODO: Make this more robust + (dolist (file (mapcar #'car doom-profile-generators)) + (when (string-match-p "/[0-9]+-loaddefs[.-]" file) + (load (doom-path doom-profile-dir doom-profile-init-dir-name file) + 'noerror)))) ;;;###autoload (defun doom/reload-env ()