Added autocomplete for messages

Merged with current upstream.