emacs: slight clean up on error case for enclosing

A refactor of the typing is required still required.
Also we need to report an error when we didn't manage to type anything (backend
side).