diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 844879d6a2d..22b02b49521 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1461,6 +1461,19 @@ process_quit_flag (void) | |||
| 1461 | quit (); | 1461 | quit (); |
| 1462 | } | 1462 | } |
| 1463 | 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 | |||
| 1464 | void | 1477 | void |
| 1465 | maybe_quit (void) | 1478 | maybe_quit (void) |
| 1466 | { | 1479 | { |