Importing merlin.el from master
emacs: first version working with the new protocol.