diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 15 |
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) | |||
| 1131 | /* Restore certain special C variables. */ | 1131 | /* Restore certain special C variables. */ |
| 1132 | set_poll_suppress_count (catch->poll_suppress_count); | 1132 | set_poll_suppress_count (catch->poll_suppress_count); |
| 1133 | unblock_input_to (catch->interrupt_input_blocked); | 1133 | unblock_input_to (catch->interrupt_input_blocked); |
| 1134 | immediate_quit = false; | ||
| 1135 | 1134 | ||
| 1136 | do | 1135 | do |
| 1137 | { | 1136 | { |
| @@ -1462,6 +1461,19 @@ process_quit_flag (void) | |||
| 1462 | quit (); | 1461 | quit (); |
| 1463 | } | 1462 | } |
| 1464 | 1463 | ||
| 1464 | /* Check quit-flag and quit if it is non-nil. Typing C-g does not | ||
| 1465 | directly cause a quit; it only sets Vquit_flag. So the program | ||
| 1466 | needs to call maybe_quit at times when it is safe to quit. Every | ||
| 1467 | loop that might run for a long time or might not exit ought to call | ||
| 1468 | maybe_quit at least once, at a safe place. Unless that is | ||
| 1469 | impossible, of course. But it is very desirable to avoid creating | ||
| 1470 | loops where maybe_quit is impossible. | ||
| 1471 | |||
| 1472 | If quit-flag is set to `kill-emacs' the SIGINT handler has received | ||
| 1473 | a request to exit Emacs when it is safe to do. | ||
| 1474 | |||
| 1475 | When not quitting, process any pending signals. */ | ||
| 1476 | |||
| 1465 | void | 1477 | void |
| 1466 | maybe_quit (void) | 1478 | maybe_quit (void) |
| 1467 | { | 1479 | { |
| @@ -1517,7 +1529,6 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool keyboard_quit) | |||
| 1517 | Lisp_Object clause = Qnil; | 1529 | Lisp_Object clause = Qnil; |
| 1518 | struct handler *h; | 1530 | struct handler *h; |
| 1519 | 1531 | ||
| 1520 | immediate_quit = false; | ||
| 1521 | if (gc_in_progress || waiting_for_input) | 1532 | if (gc_in_progress || waiting_for_input) |
| 1522 | emacs_abort (); | 1533 | emacs_abort (); |
| 1523 | 1534 | ||