aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorPhilipp Stephani2017-06-04 19:34:22 +0200
committerPhilipp Stephani2017-06-04 19:50:52 +0200
commit66da3f4afa53e5c5cfab17ca03a13a0d65083ffb (patch)
treeb045d1aa2009d66502f83ef5d599d0d94294acb9 /src/eval.c
parentd37201722e2151df1f6b6fa1e2f33b5f91e27e03 (diff)
downloademacs-66da3f4afa53e5c5cfab17ca03a13a0d65083ffb.tar.gz
emacs-66da3f4afa53e5c5cfab17ca03a13a0d65083ffb.zip
Support quitting in modules
The idea is that modules should call env->should_quit from time to time and return as quickly as possible if it returns true. * src/emacs-module.c (module_should_quit): New module function. (initialize_environment): Use it. (funcall_module): Process potential pending quit. * src/eval.c (maybe_quit): Add reference to module_should_quit.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 8aa33a11282..ef961046bcf 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1474,7 +1474,10 @@ process_quit_flag (void)
1474 If quit-flag is set to `kill-emacs' the SIGINT handler has received 1474 If quit-flag is set to `kill-emacs' the SIGINT handler has received
1475 a request to exit Emacs when it is safe to do. 1475 a request to exit Emacs when it is safe to do.
1476 1476
1477 When not quitting, process any pending signals. */ 1477 When not quitting, process any pending signals.
1478
1479 If you change this function, also adapt module_should_quit in
1480 emacs-module.c. */
1478 1481
1479void 1482void
1480maybe_quit (void) 1483maybe_quit (void)