Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1150] Fix load-history when eval autoloads #1151

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions straight.el
Original file line number Diff line number Diff line change
Expand Up @@ -5491,11 +5491,22 @@ RECIPE is a straight.el-style plist."
straight--autoloads-cache)))
;; Some autoloads files expect to be loaded normally, rather
;; than read and evaluated separately. Fool them.
;;
;; We also need to abuse `current-load-list' so that
;; autoload entries go properly into the current entry,
;; since normally that is hardcoded to happen during `load'
;; which we are not using here.
;;
;; https://github.com/radian-software/straight.el/issues/1150
;; for information on that.
(let ((load-file-name (straight--autoloads-file package))
(load-in-progress t))
(load-in-progress t)
(current-load-list nil))
;; car is the feature list, cdr is the autoloads.
(dolist (form (cdr (gethash package straight--autoloads-cache)))
(eval form))))
(eval form))
(when current-load-list
(push (cons load-file-name current-load-list) load-history))))
(straight--load-package-autoloads package))))

;;;; Interactive helpers
Expand Down
Loading