Unify lispy-to-cond and lispy-to-ifs into a single, self-reversing
function lispy-cond<->if-dwim
Bugfix: handle empty conds without maximum recursion depth errors
(lispy--to-ifs has no base case for that)
Bugfix: lispy-cond<->-if-dwim: don't error if the result is a single
else-tail symbol (cond (t t)) -> t and user-error, because
lispy-different fails (ignore user-error)
Bugfix: don't silently swallow else-tail-tails: previously (cond (t X XS...)) -> X, now (progn X XS...)
Feature: cond now supports bracketed conditions: (cond [t X XS...])
(Racket convention)
Feature: cond now supports :else as an else tail (used in the dash
library) and also a bare else in scheme-mode:
Coverage decreased (-2.6%) to 60.211% when pulling 7d9c9b2b0962d8382b62183a257bcc111319a318 on nbfalcon:feature/improve-cond<->if into 1ad128be0afc04b58967c1158439d99931becef4 on abo-abo:master.
lispy-to-cond
andlispy-to-ifs
into a single, self-reversing functionlispy-cond<->if-dwim
cond
s without maximum recursion depth errors (lispy--to-ifs
has no base case for that)lispy-cond<->-if-dwim
: don't error if the result is a single else-tail symbol (cond (t t)) ->t
anduser-error
, becauselispy-different fails
(ignoreuser-error
)(cond (t X XS...))
->X
, now(progn X XS...)
cond
now supports bracketed conditions:(cond [t X XS...])
(Racket convention)cond
now supports:else
as an else tail (used in thedash
library) and also a bareelse
inscheme-mode
:#