> On Nov 4, 2022, at 19:27, Po Lu wrote: > > Kai Ma writes: > >> + owfi = waiting_for_input; >> + waiting_for_input = false; >> + if (WINDOWP (echo_area_window) && ! NILP (safe_call_inhibit_quit (0, Qns_in_echo_area))) >> win = XWINDOW (echo_area_window); >> else >> win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe)); >> + waiting_for_input = owfi; > > Please rename `owfi' to `was_waiting_for_input' or some other more > descriptive name. What happens if you just block input around safe_call > (0, Qns_in_echo_area), instead of making an extra function that passes a > magic flag to safe__call? Either safe_call alone or safe_call+block_input does not fix the bug. >> +Lisp_Object >> +safe_call_inhibit_quit (ptrdiff_t nargs, Lisp_Object func, ...) >> +{ >> + Lisp_Object retval; >> + va_list ap; >> + >> + va_start (ap, func); >> + retval = safe__call (true, nargs, func, ap); >> + va_end (ap); >> + return retval; >> +} >> + > > This seems extraneous to me. Changed to specbind(Qinhibit_quit, Qt).