Open shaunlebron opened 8 years ago
Maybe one more case to check, suppose I have: (map (fn [c] ) changes)
If I insert (map (fn [c] {) changes)
, I suppose it would become (map (fn [c] {}) changes)
. Right now, is ignoring the close-parens and becoming: (map (fn [c] { changes}))
.
I stated things in the "Paredit emerges" section without proof, and it's been shown to not work in some cases described in #102 and #107.
I'll be revisiting assumptions. What follows is my current understanding of how to fix descriptions of expected behavior, and how to revise the rules to minimize unexpected behavior.
New Rules
New Implications
If parens are balanced:
(
: (potential splice))
is at the end of a line (or in a paren trail))
was inserted(
: (potential wrap)( )
, it is matched to the next)
. follow rules as if the parent(
was just inserted[ ]
or{ }
, suspend)
(potential slurp)(
was inserted)
(potential barf)( )
, follow rules as if the next)
was inserted[ ]
or{ }
, suspendIf parens are imbalanced: