]> git.eshelyaron.com Git - emacs.git/commitdiff
Yet another place inside redisplay_window to prevent quitting
authorEli Zaretskii <eliz@gnu.org>
Sat, 4 Dec 2021 08:37:40 +0000 (10:37 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 4 Dec 2021 08:37:40 +0000 (10:37 +0200)
* src/xdisp.c (handle_single_display_spec): Inhibit quitting
around the call to 'lookup_derived_face' (which can QUIT).
(Bug#44448)

src/xdisp.c

index 9f93799783dafabe3efccb35e4d75751308f6cdd..7ca3977200a26b070e58577f042927db1d53cb23 100644 (file)
@@ -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;
            }