diff options
author | Philipp Stephani <p.stephani2@gmail.com> | 2019-01-02 22:22:18 +0100 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2019-08-07 18:16:36 +0200 |
commit | b83f83ccd47997b7fd581026d4e1b124fa4fefc2 (patch) | |
tree | 4cf0dc952e78141fbaa6fa3d9329a8f1ca0335e1 /src | |
parent | e7818cb73ff042cb557332c7ea954fd512c87f69 (diff) | |
download | emacs-b83f83ccd47997b7fd581026d4e1b124fa4fefc2.tar.gz |
Ignore pending_signals when checking for quits.
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/emacs-module.c | 6 | ||||
-rw-r--r-- | src/eval.c | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 0abfd3f6f16..282012770eb 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -665,13 +665,13 @@ module_vec_size (emacs_env *env, emacs_value vec) 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; } diff --git a/src/eval.c b/src/eval.c index 0dc8639a8d4..2409d3d2c4b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1484,10 +1484,7 @@ process_quit_flag (void) 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) |