From: Eli Zaretskii Date: Sat, 4 Dec 2021 08:37:40 +0000 (+0200) Subject: Yet another place inside redisplay_window to prevent quitting X-Git-Tag: emacs-29.0.90~3617^2~33 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e7aff5fcdd3fa6e30497323c914f6c79c951ed6;p=emacs.git 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) --- 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; }