From 6b0ab7f5806844dc158b60a0c0c0fcc5fe5b6678 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 3 Feb 2016 13:21:10 -0800 Subject: [PATCH] Mention context when resume from emergency escape That way, if the user has been doing something else for a while, they are reminded of the situation when restarting Emacs, and are more likely to understand the two questions. * doc/emacs/trouble.texi (Emergency Escape): Document this. * src/keyboard.c (handle_interrupt): Implement this. --- doc/emacs/trouble.texi | 9 ++++++--- src/keyboard.c | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 32680633769..bd347b076d4 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -417,19 +417,22 @@ first @kbd{C-g} properly, then the second one will get you back to the shell. When you resume Emacs after a suspension caused by emergency escape, -it asks two questions before going back to what it had been doing: +it reports the resumption and asks a question or two before going back +to what it had been doing: @example +Emacs is resuming after an emergency escape. Auto-save? (y or n) Abort (and dump core)? (y or n) @end example @noindent -Answer each one with @kbd{y} or @kbd{n} followed by @key{RET}. +Answer each question with @kbd{y} or @kbd{n} followed by @key{RET}. Saying @kbd{y} to @samp{Auto-save?} causes immediate auto-saving of all modified buffers in which auto-saving is enabled. Saying @kbd{n} -skips this. +skips this. This question is omitted if Emacs is in a state where +auto-saving cannot be done safely. Saying @kbd{y} to @samp{Abort (and dump core)?} causes Emacs to crash, dumping core. This is to enable a wizard to figure out why diff --git a/src/keyboard.c b/src/keyboard.c index 64d7b139ed0..7e95ad7ad16 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10295,6 +10295,9 @@ handle_interrupt (bool in_signal_handler) is used. Note that [Enter] is not echoed by dos. */ cursor_to (SELECTED_FRAME (), 0, 0); #endif + + write_stdout ("Emacs is resuming after an emergency escape.\n"); + /* It doesn't work to autosave while GC is in progress; the code used for auto-saving doesn't cope with the mark bit. */ if (!gc_in_progress) -- 2.39.2