[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Ignore pending_signals when checking for quits.
From: |
Philipp Stephani |
Subject: |
Re: [PATCH] Ignore pending_signals when checking for quits. |
Date: |
Sun, 10 Feb 2019 19:49:39 +0100 |
Am Do., 3. Jan. 2019 um 15:03 Uhr schrieb Eli Zaretskii <address@hidden>:
>
> > From: Philipp Stephani <address@hidden>
> > Date: Wed, 2 Jan 2019 22:22:18 +0100
> > Cc: Philipp Stephani <address@hidden>
> >
> > 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;
> > }
>
> Bother. I see your point regarding the return value when just
> pending_signals is set, but disregarding pending_signals doesn't sound
> TRT to me, either. It means various Emacs features based on input
> detection won't work while the module code runs, even if the module
> tries to be nice and does call module_should_quit. For example,
> while-no-input and atimers won't work, and Emacs will generally be
> much less responsive to user input.
>
> So maybe we should indeed return true only if QUITP says so, but we
> should also call process_pending_signals from module_should_quit, when
> pending_signals is non-zero?
Wouldn't that mean that Emacs could do something (e.g. process
events)? That wouldn't match the naming and intention of should_quit:
By its name, it should only query information and not change any
state.
- Re: [PATCH] Ignore pending_signals when checking for quits.,
Philipp Stephani <=