1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00

Minor fix in detecting recursive redisplay invocations

* src/xdisp.c (redisplay_internal): Detect recursive invocations
earlier.  (Bug#66416)
This commit is contained in:
Eli Zaretskii 2024-04-16 15:12:42 +03:00
parent 9a673c6914
commit 1be21dd953

View file

@ -16863,6 +16863,13 @@ redisplay_internal (void)
redisplay_trace ("redisplay_internal %d\n", redisplaying_p);
/* I don't think this happens but let's be paranoid. In particular,
this was observed happening when Emacs shuits down to to losing X
connection, in which case accessing SELECTED_FRAME and the frame
structure is likely to barf. */
if (redisplaying_p)
return;
/* No redisplay if running in batch mode or frame is not yet fully
initialized, or redisplay is explicitly turned off by setting
Vinhibit_redisplay. */
@ -16890,10 +16897,6 @@ redisplay_internal (void)
return;
#endif
/* I don't think this happens but let's be paranoid. */
if (redisplaying_p)
return;
/* Record a function that clears redisplaying_p
when we leave this function. */
specpdl_ref count = SPECPDL_INDEX ();