                             (plist-get state :recipe)
                             name)))
             (straight-use-package
-             recipe (or
-                     ;; Normalize value of `only-if-installed'.
-                     (and only-if-installed 'lazy)
-                     (unless (member context '(:byte-compile :ensure
-                                               :config :pre-ensure
-                                               :interactive))
-                       (lambda (package)
-                         ;; Value of NO-CLONE has a meaning that is
-                         ;; the opposite of ONLY-IF-INSTALLED.
-                         (not
-                          (y-or-n-p
-                           (format "Install package %S? " package))))))))))
+             recipe
+             (lambda (package available)
+               (cond
+                ;; When doing lazy installation, don't clone if not
+                ;; available.
+                (only-if-installed (not available))
+                ;; In cases where installation should be automatic, do
+                ;; it.
+                ((memq context '(:byte-compile :ensure
+                                 :config :pre-ensure
+                                 :interactive))
+                 nil)
+                ;; Otherwise, prompt the user.
+                (t
+                 ;; Value of NO-CLONE has a meaning that is the
+                 ;; opposite of ONLY-IF-INSTALLED.
+                 (not
+                  (y-or-n-p
+                   (format "Install package %S? " package))))))))))
 
       (defun straight-use-package-pre-ensure-function
           (name ensure state)

                (cl-incf n)
              (cl-return-from straight--uniquify candidate)))))
    prefix))

;;;;; Messaging


This function is equivalent to calling `straight-use-package'
with symbol `lazy' for NO-CLONE. It is provided for convenience.
MELPA-STYLE-RECIPE is as for `straight-use-package'."
  (straight-use-package
   melpa-style-recipe
   ;; Don't clone the package if it's not available.
   (lambda (_package available)
     (not available))))

;;;###autoload
(defun straight-use-recipes (melpa-style-recipe)
