Skip to content

Commit

Permalink
fix: bootstrapping error when Emacs lack some builtin features
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed May 11, 2024
1 parent 7263cdc commit 26fae16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/me-use-package-extra.el
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@
(not (and (memq :unless args) (not (eval (+varplist-get args :unless t)))))))
;; Register the package but don't enable it, useful when creating the lockfile,
;; this is the official straight.el way for conditionally installing packages
(straight-register-package package)
(when-let* ((recipe (+varplist-get args :straight t)))
(let* ((recipe (if (eq recipe t) (list package) recipe))
(car-recipe (and (listp recipe) (car recipe)))
(car-recipe-is-pkg (and (symbolp car-recipe) (not (keywordp car-recipe))))
(recipe (if (and car-recipe car-recipe-is-pkg) recipe (append (list package) recipe))))
(straight-register-package recipe)))
;; Otherwise, add it to the list of configured packages and apply the `use-package' form
(add-to-list 'minemacs-configured-packages package t)
(apply origfn package args))))
Expand Down

0 comments on commit 26fae16

Please sign in to comment.