radian-software/el-patch

Swapped arguments in patch validation?

mz-pdm opened this issue · 3 comments

I define a patch like this:

(defun foo (x)
  (+ x 1))
(el-patch-defun foo (x)
  (+ x (el-patch-swap 1 2)))

The patch works fine, but when I run M-x el-patch-validate on the patch, I receive the error "el-patch--classify-definition-type: Unexpected definition type foo". It seems that the function name and definition type are swapped somewhere.

BTW, el-patch is a great tool. I thought about writing a tool with a similar purpose and I'm glad it's already done :-). Thank you!

Thanks for reporting this. I will look into it shortly.

I believe the issue should be fixed now. Does it work for you?

Yes, it works for me now. Thank you for the fix.