Support quitting in modules
commit66da3f4afa53e5c5cfab17ca03a13a0d65083ffb
authorPhilipp Stephani <phst@google.com>
Sun, 4 Jun 2017 17:34:22 +0000 (4 19:34 +0200)
committerPhilipp Stephani <phst@google.com>
Sun, 4 Jun 2017 17:50:52 +0000 (4 19:50 +0200)
treeb045d1aa2009d66502f83ef5d599d0d94294acb9
parentd37201722e2151df1f6b6fa1e2f33b5f91e27e03
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.
src/emacs-module.c
src/emacs-module.h
src/eval.c