]> code.delx.au - gnu-emacs/commitdiff
Fix (c & 040) typo in emergency escapes
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 31 Jan 2016 18:38:41 +0000 (10:38 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 31 Jan 2016 18:39:14 +0000 (10:39 -0800)
* 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.

src/keyboard.c

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