Go to the first, previous, next, last section, table of contents.

How do I get rid of the ^M junk in my Shell buffer?

For tcsh, put this in your `.cshrc' (or `.tcshrc') file:

  if ($?EMACS) then
      if ("$EMACS" == t) then
          if ($?tcsh) unset edit
          stty nl
      endif
  endif

Or put this in your .emacs_tcsh file:

  unset edit
  stty nl

Alternatively, use csh in your Shell buffers instead of tcsh. One way is:

  (setq explicit-shell-file-name "/bin/csh")

and another is to do this in your .cshrc (or .tcshrc) file:

  setenv ESHELL /bin/csh

(You must start Emacs over again with the environment variable properly set for this to take effect.)


Go to the first, previous, next, last section, table of contents.