              (read defun-buffer))))))
 
 ;;;###autoload
-(defun el-patch-validate (name)
-  "Validate the patch for the function NAME.
+(defun el-patch-validate (patch-definition &optional nomsg)
+  "Validate the patch given by PATCH-DEFINITION.
 This means el-patch will attempt to find the original definition
 for the function, and verify that it is the same as the original
 function assumed by the patch. A warning will be signaled if the

        (warning-count 0))
    (maphash (lambda (name patch-definition)
               (setq patch-count (1+ patch-count))
               (unless (el-patch-validate name)
                 (setq warning-count (1+ warning-count))))
             el-patch--patches)
    (cond

       (format (concat "Definition of `%S' differs from what "
                       "is assumed by its patch")
               name)
       nil))
     (t
      (unless nomsg
        (message "Patch is valid"))
      t))))

;;;###autoload
(defun el-patch-validate-all ()
