Fix (c & 040) typo in emergency escapes

* src/keyboard.c (handle_interrupt): Fix recently-introduced
typo (040 should have been ~040) that silently suppressed
auto-saves after emergency escapes.  Redo comparison to avoid
similar problems.
This commit is contained in:
Paul Eggert 2016-01-31 10:38:41 -08:00
parent a8273dacd5
commit 7b1d2b1b62

View file

@ -10302,7 +10302,7 @@ handle_interrupt (bool in_signal_handler)
{ {
write_stdout ("Auto-save? (y or n) "); write_stdout ("Auto-save? (y or n) ");
c = read_stdin (); c = read_stdin ();
if ((c & 040) == 'Y') if (c == 'y' || c == 'Y')
{ {
Fdo_auto_save (Qt, Qnil); Fdo_auto_save (Qt, Qnil);
#ifdef MSDOS #ifdef MSDOS
@ -10334,7 +10334,7 @@ handle_interrupt (bool in_signal_handler)
write_stdout ("Abort (and dump core)? (y or n) "); write_stdout ("Abort (and dump core)? (y or n) ");
#endif #endif
c = read_stdin (); c = read_stdin ();
if ((c & ~040) == 'Y') if (c == 'y' || c == 'Y')
emacs_abort (); emacs_abort ();
while (c != '\n') while (c != '\n')
c = read_stdin (); c = read_stdin ();