summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorNickolas Lloyd <ultrageek.lloyd@gmail.com>2017-02-01 22:31:55 -0500
committerNickolas Lloyd <ultrageek.lloyd@gmail.com>2017-02-01 22:31:55 -0500
commit9a15b5509abb49a11c97c1101ad216f4ef258368 (patch)
tree7311337d92833cb8f233eaa696a967a15a306a80 /src/eval.c
parent5d8f2548ceaa5a0b33c08a39f1d6c11071ec63aa (diff)
parent70d36dda26465b43c1a63e8e13153e070af86456 (diff)
downloademacs-nick.lloyd-bytecode-jit.tar.gz
Merge branch 'master' into nick.lloyd-bytecode-jitnick.lloyd-bytecode-jit
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index 68b48f95a44..54a646b69e9 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1131,7 +1131,6 @@ unwind_to_catch (struct handler *catch, Lisp_Object value)
/* Restore certain special C variables. */
set_poll_suppress_count (catch->poll_suppress_count);
unblock_input_to (catch->interrupt_input_blocked);
- immediate_quit = false;
do
{
@@ -1462,6 +1461,19 @@ process_quit_flag (void)
quit ();
}
+/* Check quit-flag and quit if it is non-nil. Typing C-g does not
+ directly cause a quit; it only sets Vquit_flag. So the program
+ needs to call maybe_quit at times when it is safe to quit. Every
+ loop that might run for a long time or might not exit ought to call
+ maybe_quit at least once, at a safe place. Unless that is
+ impossible, of course. But it is very desirable to avoid creating
+ loops where maybe_quit is impossible.
+
+ If quit-flag is set to `kill-emacs' the SIGINT handler has received
+ a request to exit Emacs when it is safe to do.
+
+ When not quitting, process any pending signals. */
+
void
maybe_quit (void)
{
@@ -1517,7 +1529,6 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool keyboard_quit)
Lisp_Object clause = Qnil;
struct handler *h;
- immediate_quit = false;
if (gc_in_progress || waiting_for_input)
emacs_abort ();