Transform a LISP case into a cond with lispy09 Jun 2015
Just a little extension to the old xc (
command that I've added today to lispy:
Previously, xc could only transform a series of nested
cond. You can even chain xcxi to transform a
case statement into equivalent
Note also that unwanted whitespace is properly removed. What you see in the picture is actually an ERT test that's being run each time I commit new stuff. It makes sure that starting in the first buffer state and pressing xc really results in the second buffer state. With this test, it's reasonable to believe that xc will actually work the same way in an interactive scenario. Right now, there are 599 of these type of tests in lispy-test.el. To view them like in the screenshot, you can press xv.
Final note, I realize that it should be
eql instead of
eq, but I
eq more: it's 33% more efficient.