        'el-patch
        (format "Could not find definition of `%S'" name))
       nil)
-     ((not (equal old-definition actual-definition))
+     ((not (equal expected-definition actual-definition))
 
       (display-warning
        'el-patch


See also `el-patch-validate-all'."
  (interactive (list (el-patch--select-patch)))
  (let* ((name (cadr patch-definition))
         (old-definition (el-patch--resolve-definition
                          patch-definition nil))
         (actual-definition (el-patch--find-function name)))
    (cond
     ((not actual-definition)

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)))))

;;;###autoload
(defun el-patch-validate (patch-definition &optional nomsg)
