improve the shell mode in emacs