   "Return the Lisp form that defines the function NAME.
 Return nil if such a definition cannot be found. (That would
 happen if the definition were generated dynamically, or the
-function is defined in the C code.)"
-  (if (or (fboundp name)
-          el-patch--feature)
-      (progn
-        (when el-patch--feature
-          (require el-patch--feature))
-        (if (fboundp name)
-            (let* ((buffer-point (ignore-errors
-                                   ;; Just in case we get an error because the
-                                   ;; function is defined in the C code, we
-                                   ;; ignore it and return nil.
-                                   (save-excursion
-                                     ;; This horrifying bit of hackery
-                                     ;; prevents `find-function-noselect' from
-                                     ;; returning an existing buffer, so that
-                                     ;; later on when we jump to the
-                                     ;; definition, we don't temporarily
-                                     ;; scroll the window if the definition
-                                     ;; happens to be in the *current* buffer.
-                                     (prog2
-                                         (advice-add #'get-file-buffer :override
-                                                     #'ignore)
-                                         (find-function-noselect name 'lisp-only)
-                                       (advice-remove #'get-file-buffer #'ignore)))))
-                   (defun-buffer (car buffer-point))
-                   (defun-point (cdr buffer-point)))
-              (and defun-buffer
-                   defun-point
-                   (with-current-buffer defun-buffer
-                     (save-excursion
-                       (goto-char defun-point)
-                       (read defun-buffer)))))
-          (ignore
-           (display-warning
-            'el-patch
-            (format (concat "`%S' is not defined, are you sure it is provided "
-                            "by feature `%S'?")
-                    name el-patch--feature)))))
-    (ignore
-     (display-warning
-      'el-patch
-      (format (concat "`%S' is not defined, you must specify a feature "
-                      "in the patch")
-              name)))))
+function is defined in the C code, or the function is not
+autoloaded and not provided by `el-patch--feature'.) If
+`el-patch--feature' is non-nil, `require' that feature first."
+  (when el-patch--feature
+    (require el-patch--feature))
+  (when (fboundp name)
+    (let* ((buffer-point (ignore-errors
+                           ;; Just in case we get an error because the
+                           ;; function is defined in the C code, we
+                           ;; ignore it and return nil.
+                           (save-excursion
+                             ;; This horrifying bit of hackery
+                             ;; prevents `find-function-noselect' from
+                             ;; returning an existing buffer, so that
+                             ;; later on when we jump to the
+                             ;; definition, we don't temporarily
+                             ;; scroll the window if the definition
+                             ;; happens to be in the *current* buffer.
+                             (prog2
+                                 (advice-add #'get-file-buffer :override
+                                             #'ignore)
+                                 (find-function-noselect name 'lisp-only)
+                               (advice-remove #'get-file-buffer #'ignore)))))
+           (defun-buffer (car buffer-point))
+           (defun-point (cdr buffer-point)))
+      (and defun-buffer
+           defun-point
+           (with-current-buffer defun-buffer
+             (save-excursion
+               (goto-char defun-point)
+               (read defun-buffer)))))))
 
 ;;;###autoload
 (defun el-patch-validate (patch-definition &optional nomsg)

      (setq el-patch--feature nil)
      (eval (el-patch--function-to-advice
             (el-patch--resolve-definition patch-definition t)))
      (unless (fboundp function-name)
        (fset function-name #'el-patch-unloaded-function))
      (advice-add function-name :override advice-name))))

;;;###autoload

  `(defun ,(el-patch--advice-name (cadr definition))
       ,@(cddr definition)))

(defun el-patch--autoload-function (function-name feature)
  (let ((recursive-autoload
         (intern (format "el-patch--recursive-autoload--%S"
                         function-name))))
    `(defun ,function-name (&rest args)
       ,(format "This function is a stub generated by el-patch. The patch for
`%S' has been loaded (see the `:override' advice on this function),
but the original definition of `%S', which is provided by feature `%S'
has not yet been loaded.

If you the `:override' advice and then call this function, it will
load feature `%S' and then invoke the actual definition of `%S',
just like an autoload."
                function-name function-name feature feature function-name)
       (if (boundp ',recursive-autoload)
           (error "Autoload of `%S' failed to define `%S'"
                  feature function-name)
         (require ',feature)
         (apply ',function-name args)))))

(defun el-patch--stealthy-defun (function-name definition)
  ;; FIXME should prevent `load-history' from being updated
  (eval definition))

(defun el-patch--definition (patch-definition)
  "Activate a PATCH-DEFINITION.
