As we expand with new features and get tree-sitter working, we're
going to have more to keep track of than can reasonably be done with
individual arguments. Guile's modified srfi-9 lets us do this in a
nice functional style.
This also subtly tweaks the behavior of character insertion so it's
actually correct.