diff options
author | Po Lu <luangruo@yahoo.com> | 2021-11-06 13:58:52 +0800 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-07 02:59:41 +0100 |
commit | cd1f02e1e39c187f795f7b09aa5baee22f5b058d (patch) | |
tree | 2596cb09c607cef5acc263fb71e5bc0db40f9396 /src/print.c | |
parent | eb5a079feed99379dacf8c6ced449a65e8069c4b (diff) | |
download | emacs-cd1f02e1e39c187f795f7b09aa5baee22f5b058d.tar.gz |
Make xwidgets print nicer
* src/print.c (print_vectorlike): Print xwidgets with ID and widget
pointer, and print xwidget views separately.
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/print.c b/src/print.c index c13294c8e62..eca389158f9 100644 --- a/src/print.c +++ b/src/print.c @@ -1521,8 +1521,20 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, printchar ('>', printcharfun); break; - case PVEC_XWIDGET: case PVEC_XWIDGET_VIEW: - print_c_string ("#<xwidget ", printcharfun); + case PVEC_XWIDGET: +#ifdef HAVE_XWIDGETS + { + int len = sprintf (buf, "#<xwidget %u %p>", + XXWIDGET (obj)->xwidget_id, + XXWIDGET (obj)->widget_osr); + strout (buf, len, len, printcharfun); + break; + } +#else + emacs_abort (); +#endif + case PVEC_XWIDGET_VIEW: + print_c_string ("#<xwidget view", printcharfun); printchar ('>', printcharfun); break; |