diff --git a/README.md b/README.md index 93efd2a..e5447f1 100644 --- a/README.md +++ b/README.md @@ -627,6 +627,12 @@ that takes effect, but `el-patch` retains a record of both patches, meaning they can be inspected and validated individually. See [#29](https://github.com/radian-software/el-patch/issues/29). +You may also define patches of functions as `:override` advices +instead of overriding the original definition. This is done by setting +`el-patch-use-advice` to a non-nil value (either dynamically around a +patch or globally). The patched function must have the same name and +number of arguments as the original function. + ## Usage with byte-compiled init-file `el-patch` does not need to be loaded at runtime just to define diff --git a/el-patch.el b/el-patch.el index 6c7f819..f10048c 100644 --- a/el-patch.el +++ b/el-patch.el @@ -235,7 +235,7 @@ This function lives halfway between `copy-sequence' and tree)) (defun el-patch--advice-name (name variant-name) - "Return advice name for a given NAME, TYPE and VARIANT-NAME." + "Return advice name for a given NAME and VARIANT-NAME." (intern (format "%S@%s@el-patch--advice" name