# HG changeset patch # User Richard M. Stallman # Date 864009256 0 # Node ID a2fefbc6e46b63467e93e7ecba06b18ee927a74e # Parent bc2cf7c40435293d5edba9caa187d96481d09dfe (init_sys_modes): Initialize Vtty_erase_char if possible from the stty settings, otherwise to nil. diff -r bc2cf7c40435 -r a2fefbc6e46b src/sysdep.c --- a/src/sysdep.c Mon May 19 02:17:26 1997 +0000 +++ b/src/sysdep.c Mon May 19 02:34:16 1997 +0000 @@ -1206,7 +1206,7 @@ static struct ltchars new_ltchars = {-1,-1,-1,-1,-1,-1}; #endif #ifdef HAVE_TCHARS - static struct tchars new_tchars = {-1,-1,-1,-1,-1,-1}; +static struct tchars new_tchars = {-1,-1,-1,-1,-1,-1}; #endif init_sys_modes () @@ -1220,6 +1220,8 @@ #endif #endif + Vtty_erase_char = Qnil; + if (noninteractive) return; @@ -1273,6 +1275,8 @@ tty = old_tty; #if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS) + Vtty_erase_char = old_tty.main.c_cc[VERASE]; + #ifdef DGUX /* This allows meta to be sent on 8th bit. */ tty.main.c_iflag &= ~INPCK; /* don't check input for parity */ @@ -1386,6 +1390,7 @@ tty.main.tt2_char |= TT2$M_PASTHRU | TT2$M_XON; #else /* not VMS (BSD, that is) */ #ifndef DOS_NT + Vtty_erase_char = tty.main.sg_erase; tty.main.sg_flags &= ~(ECHO | CRMOD | XTABS); if (meta_key) tty.main.sg_flags |= ANYP;