pending_signals is often set if no quit is pending. This results in
bugs in module code if the module returns but no quit is actually
pending.
* src/emacs-module.c (module_should_quit): Use QUITP macro to check
whether the caller should quit.
* src/eval.c: Remove obsolete comment.
return ASIZE (lvec);
}
-/* This function should return true if and only if maybe_quit would do
- anything. */
+/* This function should return true if and only if maybe_quit would
+ quit. */
static bool
module_should_quit (emacs_env *env)
{
MODULE_FUNCTION_BEGIN_NO_CATCH (false);
- return (! NILP (Vquit_flag) && NILP (Vinhibit_quit)) || pending_signals;
+ return QUITP;
}
\f
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.
-
- If you change this function, also adapt module_should_quit in
- emacs-module.c. */
+ When not quitting, process any pending signals. */
void
maybe_quit (void)