From 3e7aff5fcdd3fa6e30497323c914f6c79c951ed6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Dec 2021 10:37:40 +0200 Subject: [PATCH] Yet another place inside redisplay_window to prevent quitting * src/xdisp.c (handle_single_display_spec): Inhibit quitting around the call to 'lookup_derived_face' (which can QUIT). (Bug#44448) --- src/xdisp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 9f93799783d..7ca3977200a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5822,8 +5822,15 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object, if (CONSP (XCDR (XCDR (spec)))) { Lisp_Object face_name = XCAR (XCDR (XCDR (spec))); - int face_id2 = lookup_derived_face (it->w, it->f, face_name, - FRINGE_FACE_ID, false); + int face_id2; + /* Don't allow quitting from lookup_derived_face, for when + we are displaying a non-selected window, and the buffer's + point was temporarily moved to the window-point. */ + ptrdiff_t count1 = SPECPDL_INDEX (); + specbind (Qinhibit_quit, Qt); + face_id2 = lookup_derived_face (it->w, it->f, face_name, + FRINGE_FACE_ID, false); + unbind_to (count1, Qnil); if (face_id2 >= 0) face_id = face_id2; } -- 2.39.5