From 4d1968b4c9eb1d42c125b4536e3b4543b91f3634 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 1 Jan 2022 08:54:51 +0800 Subject: [PATCH] Print dead xwidgets specially * src/print.c (print_vectorlike) : Print "killed xwidget" for dead xwidgets. --- src/print.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/print.c b/src/print.c index 214f1d12c11..9f3d8317ae3 100644 --- a/src/print.c +++ b/src/print.c @@ -1524,16 +1524,21 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, case PVEC_XWIDGET: #ifdef HAVE_XWIDGETS { + if (NILP (XXWIDGET (obj)->buffer)) + print_c_string ("#", printcharfun); + else + { #ifdef USE_GTK - int len = sprintf (buf, "#", - XXWIDGET (obj)->xwidget_id, - XXWIDGET (obj)->widget_osr); + int len = sprintf (buf, "#", + XXWIDGET (obj)->xwidget_id, + XXWIDGET (obj)->widget_osr); #else - int len = sprintf (buf, "#", - XXWIDGET (obj)->xwidget_id, - XXWIDGET (obj)->xwWidget); + int len = sprintf (buf, "#", + XXWIDGET (obj)->xwidget_id, + XXWIDGET (obj)->xwWidget); #endif - strout (buf, len, len, printcharfun); + strout (buf, len, len, printcharfun); + } break; } #else -- 2.39.2