@@ -291,22 +291,15 @@ caches them in `doom--profiles'. If RELOAD? is non-nil, refresh the cache."
291291 (print! (start " Reading %s..." ) file))
292292 (doom-file-read file :by 'insert ))
293293 (prin1 `(defun doom-startup ()
294- (let ((startup-or-reload?
295- ; ; Make sure this only runs at startup to protect
296- ; ; us Emacs' interpreter re-evaluating this file
297- ; ; when lazy-loading dynamic docstrings from the
298- ; ; byte-compiled init file.
299- (or (doom-context-p 'startup )
300- (doom-context-p 'reload ))))
301- (when startup-or-reload?
302- ,@(cl-loop for (_ genfn initfn) in doom-profile-generators
303- if (fboundp genfn)
304- collect (list initfn))
305- ,@(when-let* ((info-dirs (butlast Info-directory-list)))
306- `((require 'info )
307- (info-initialize )
308- (setq Info-directory-list
309- (append ', info-dirs Info-directory-list)))))))
294+ ; ; Make sure this only runs at startup to protect us
295+ ; ; Emacs' interpreter re-evaluating this file when
296+ ; ; lazy-loading dynamic docstrings from the byte-compiled
297+ ; ; init file.
298+ (when (or (doom-context-p 'startup )
299+ (doom-context-p 'reload ))
300+ ,@(cl-loop for (_ genfn initfn) in doom-profile-generators
301+ if (fboundp genfn)
302+ collect (list initfn))))
310303 (current-buffer )))
311304 (print! (start " Byte-compiling %s..." ) (relpath init-file))
312305 (print-group!
@@ -421,7 +414,17 @@ caches them in `doom--profiles'. If RELOAD? is non-nil, refresh the cache."
421414 (nreverse (seq-difference (hash-table-keys straight--build-cache)
422415 doom-autoloads-excluded-packages)))
423416 doom-autoloads-excluded-files
424- 'literal )))))
417+ 'literal ))
418+ ,@(when-let* ((info-dirs
419+ (cl-loop for key in (hash-table-keys straight--build-cache)
420+ for dir = (straight--build-dir key)
421+ for file = (straight--build-file dir " dir" )
422+ if (file-exists-p file)
423+ collect dir)))
424+ `((require 'info )
425+ (info-initialize )
426+ (setq Info-directory-list
427+ (append ', info-dirs Info-directory-list)))))))
425428
426429(provide 'doom-lib '(profiles))
427430; ;; profiles.el ends here
0 commit comments