 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;; Validating patches
 
+;;;###autoload
+(defun el-patch-declare-feature (feature)
+  "Declare that there are unloaded patch definitions for FEATURE.
+This is useful if you lazy-load your configuration and the
+patches for functions provided by a certain feature are not
+defined until that feature is actually loaded.
+
+If you declare a feature in this way, then it is loaded when you
+call `el-patch-validate-all', or when you call
+`el-patch-validate' with a prefix argument."
+  (cl-pushnew feature el-patch--features))
+
 (defun el-patch--find-function (name)
   "Return the Lisp form that defines the function NAME.
 Return nil if such a definition cannot be found. (That would

;;;###autoload
(defun el-patch-validate-all ()
  "Validate all currently defined patches.
See `el-patch-validate'."
  (interactive)
  (let ((patch-count 0)
        (warning-count 0))
    (maphash (lambda (name patch-definition)

there is a difference between the actual and expected original
definitions.

Interactively, use `completing-read' to select a function to
inspect the patch of. With a prefix argument, load all the
features declared by `el-patch-declare-feature' first.

PATCH-DEFINITION is a list beginning with `defun', `defmacro',
etc.

