Preventing ^M in Shell Mode


To prevent ^M from appearing at the ends of lines in emacs shell mode, run these two commands:
unset lineedit edit
stty nl -echo
You can also have this done automatically every time you start up a shell mode buffer by having a file called ~/.emacs_tcsh with this line in it:
unset lineedit edit; stty nl -echo