emacs: fix merlin-type-enclosing temporary keymap

The recently added event-loop stuff isn't a very clean way to do temporary keymaps. It causes problems with commands that are not in the keymap: you can see this by doing something like

  M-x merlin-type-enclosing
  <some unrelated command such as movement>

Which will actually insert a character. Emacs has some support for temporary keymaps that should suffice for this use case, so this patch changes things to use that.