radian-software/el-patch

Can I use this to verify a function I'd like to advise?

hrehfeld opened this issue · 1 comments

Can I use this to verify a function I'd like to advise?

The idea would be that my advice fails if the function changes. Basically, can I validate source form somehow without patching it?

Sure, you can just copy the function definition and replace defun with el-patch-defun. It's a patch, but the patch is a no-op because you haven't changed the definition. Running el-patch-validate-all will report an error if the definition has changed since you created the patch. Is that what you're looking for?