branch: externals/setup
commit 69c3a07c2349eeb42716308e0f9629df1f1c7458
Author: Philip Kaludercic <phil...@posteo.net>
Commit: Philip Kaludercic <phil...@posteo.net>

    Refresh package archive contents if package is not known
---
 setup.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/setup.el b/setup.el
index 91ce235..9b96637 100644
--- a/setup.el
+++ b/setup.el
@@ -280,6 +280,8 @@ If HOOK is a list, apply BODY to all elements of HOOK."
 (setup-define :package
   (lambda (package)
     `(unless (package-installed-p ',package)
+       (unless (memq ',package package-archive-contents)
+         (package-refresh-contents))
        (package-install ',package)))
   :documentation "Install PACKAGE if it hasn't been installed yet.
 This macro can be used as HEAD, and it will replace itself with

Reply via email to