From b89b23079cba00113fbc8b658a07e884392ff3a1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 19 Jun 2022 17:15:40 +0300 Subject: [PATCH] Show warnings about aborted redisplay * src/xdisp.c (redisplay_window_error): Show messages about aborted redisplay of a window as delayed-warnings. --- src/xdisp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index f95aeb6149a..e9dcdd72333 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17161,9 +17161,19 @@ redisplay_windows (Lisp_Object window) } static Lisp_Object -redisplay_window_error (Lisp_Object ignore) +redisplay_window_error (Lisp_Object error_data) { displayed_buffer->display_error_modiff = BUF_MODIFF (displayed_buffer); + + /* When in redisplay, the error is captured and not shown. Arrange + for it to be shown later. */ + if (max_redisplay_ticks > 0 + && CONSP (error_data) + && EQ (XCAR (error_data), Qerror) + && STRINGP (XCAR (XCDR (error_data)))) + Vdelayed_warnings_list = Fcons (list2 (XCAR (error_data), + XCAR (XCDR (error_data))), + Vdelayed_warnings_list); return Qnil; } -- 2.39.2