emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 7b1d2b1: Fix (c & 040) typo in emergency escapes


From: Paul Eggert
Subject: [Emacs-diffs] emacs-25 7b1d2b1: Fix (c & 040) typo in emergency escapes
Date: Sun, 31 Jan 2016 18:39:18 +0000

branch: emacs-25
commit 7b1d2b1b620b0c5815fba705eedd5f1353f0c488
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 src/keyboard.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/keyboard.c b/src/keyboard.c
index 20aa2db..546c012 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -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 ();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]