BUG: Do not display VT100 escapes inside emacs even if TERM is set to xterm.

This commit is contained in:
Brad King 2006-07-20 09:35:20 -04:00
parent 44508f7e79
commit 30c746d8c5
1 changed files with 9 additions and 0 deletions

View File

@ -160,6 +160,15 @@ static const char* kwsysTerminalVT100Names[] =
static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
int default_tty)
{
/* If running inside emacs the terminal is not VT100. Some emacs
seem to claim the TERM is xterm even though they do not support
VT100 escapes. */
const char* emacs = getenv("EMACS");
if(emacs && *emacs == 't')
{
return 0;
}
/* Check for a valid terminal. */
if(!default_vt100)
{