From: Po Lu Date: Sat, 1 Jan 2022 00:54:51 +0000 (+0800) Subject: Print dead xwidgets specially X-Git-Tag: emacs-29.0.90~3324^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d1968b4c9eb1d42c125b4536e3b4543b91f3634;p=emacs.git Print dead xwidgets specially * src/print.c (print_vectorlike) : Print "killed xwidget" for dead xwidgets. --- 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