mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
This fixes a couple bugs with this macro: - Nested %-refs (in nested fn!'s) were interpolated as arguments of the outer-most fn!. E.g. (fn! (fn! %2)) would expand to: Before this fix: (lambda (_%1 %2) (lambda (_%1 %2) %2)) After this fix: (lambda () (lambda (_%1 %2) %2)) - Unused arguments were not only listed in the wrong order, they were off-by-one. E.g. (fn! %3 %5) expands to (lambda (_%4 _%3 %3 _%1 %5) %3 %5) This never caused any actual issues, but it was unexpected. I've also moved the lookup table to `fn!`, and removed unnecessary entries from it.