 
   ;; Lazy-load Ivy.
 
-  (defvar ivy-mode-map
+  (defun radian--enable-ivy-patches ()
+    (require 'ivy))
+
+  (add-hook 'el-patch-pre-validate-hook #'radian--enable-ivy-patches)
+
+  (el-patch-defvar ivy-mode-map
     (let ((map (make-sparse-keymap)))
       (define-key map [remap switch-to-buffer]
         'ivy-switch-buffer)

  :dependencies (company)
  :demand t
  :config

  ;; Disable the message that is normally printed when Company
  ;; Statistics loads its statistics file from disk.

  ;;
  ;; [1]: https://github.com/jwiegley/use-package/issues/413

  (defun radian--enable-counsel-projectile-patches ()
    (require 'counsel-projectile))

  (add-hook 'el-patch-pre-validate-hook
            #'radian--enable-counsel-projectile-patches)

  (el-patch-defun counsel-projectile-commander-bindings ()
    (def-projectile-commander-method ?f
      "Find file in project."
