Skip to content

Commit 7531c42

Browse files
committed
fix: indexing packages' Info documents (part 2)
The issue required a more systemic fix, because the former (before 9e6c46a even) only recorded `Info-directory-list` for the packages that were installed/updated in that `doom sync` session, forgetting all packages installed in the past. Fix: #8143 Amend: 9e6c46a
1 parent b26980a commit 7531c42

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

lisp/lib/autoloads.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ hoist buggy forms into autoloads.")
1616
auto-mode-alist
1717
interpreter-mode-alist
1818
magic-mode-alist
19-
magic-fallback-mode-alist)
19+
magic-fallback-mode-alist
20+
Info-directory-list)
2021
"A list of variables to be cached in `doom-autoloads-file'.")
2122

2223
(defvar doom-autoloads-files ()

lisp/lib/profiles.el

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)