Customized term mode for Emacs