        (fmakunbound 'use-package-handler/:straight)
        (when (and (boundp 'use-package-defaults)
                   (listp use-package-defaults))
-         (setf (alist-get :straight use-package-defaults nil 'remove) nil)))))
+         (setq use-package-defaults
+               (assq-delete-all :straight use-package-defaults))))))
   (setq straight-use-package--last-version nil)
   (when straight-use-package-mode
     (setq straight-use-package--last-version straight-use-package-version)

                bindings)))))

(eval-when-compile
  (when (version< emacs-version "25.1")

    ;; Definition from Emacs 25.3, subr.el
    (gv-define-expander alist-get
      (lambda (do key alist &optional default remove)
        (macroexp-let2 macroexp-copyable-p k key
          (gv-letplace (getter setter) alist
            (macroexp-let2 nil p `(assq ,k ,getter)
              (funcall do (if (null default) `(cdr ,p)
                            `(if ,p (cdr ,p) ,default))
                       (lambda (v)
                         (macroexp-let2 nil v v
                           (let ((set-exp
                                  `(if ,p (setcdr ,p ,v)
                                     ,(funcall setter
                                               `(cons (setq ,p (cons ,k ,v))
                                                      ,getter)))))
                             (cond
                              ((null remove) set-exp)
                              ((or (eql v default)
                                   (and (eq (car-safe v) 'quote)
                                        (eq (car-safe default) 'quote)
                                        (eql (cadr v) (cadr default))))
                               `(if ,p ,(funcall setter `(delq ,p ,getter))))
                              (t
                               `(cond
                                 ((not (eql ,default ,v)) ,set-exp)
                                 (,p ,(funcall setter
                                               `(delq ,p ,getter)))))))))))))))

    ;; Defined by Emacs 25.3 in C source code
    (defvar inhibit-message)))


           #'straight-use-package--straight-handler)
         (when (and (boundp 'use-package-defaults)
                    (listp use-package-defaults))
           (setq use-package-defaults (straight--alist-set
                                       :straight
                                       '('(t) straight-use-package-by-default)
                                       use-package-defaults
                                       'symbol))))))))

(if straight-enable-use-package-integration
    (straight-use-package-mode +1)
