Skip to content

Commit

Permalink
check quelpa package availability using a simpler form that doesn't r…
Browse files Browse the repository at this point in the history
…equire package
  • Loading branch information
kiennq committed Aug 23, 2024
1 parent 5cd28b7 commit 5410bb6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions quelpa-use-package.el
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,15 @@ This option will disable `quelpa-persistent-cache-p'."
(let ((info (pcase (car args)
((pred listp) (car args))
(`,pkg `(,pkg)))))
`((if (and quelpa-use-package-inhibit-loading-quelpa
(package-installed-p ',(car info)))
(when quelpa-use-package-as-source-of-truth
(setq quelpa-cache (when (boundp 'quelpa-cache) quelpa-cache))
(setf (alist-get ',(car info) quelpa-cache) ',(cdr info)))
(quelpa ',@args))))
`((let ((pkg ',(car info)))
(require 'finder-inf nil t)
(if (and quelpa-use-package-inhibit-loading-quelpa
(or (assq pkg package--builtins)
(memq pkg package-activated-list)))
(when quelpa-use-package-as-source-of-truth
(setq quelpa-cache (when (boundp 'quelpa-cache) quelpa-cache))
(setf (alist-get ',(car info) quelpa-cache) ',(cdr info)))
(quelpa ',@args)))))
body)
body)))

Expand Down

0 comments on commit 5410bb6

Please sign in to comment.