Subject: Re: bug#51473: [PATCH] Enable xwidget scrolling optimizations, and other xwidgets improvements

From: Eli Zaretskii <[email-masked]>
Date: Sun, 07 Nov 2021 12:09:00 +0200

> From: Po Lu <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Sun, 07 Nov 2021 08:41:15 +0800
> 
> Lars Ingebrigtsen <[email-masked]> writes:
> 
> > I can test both, but it'd be easier to test if it was just one huge
> > patch.  (When applying for real, we can apply the patch series.)  So can
> > you post this series as one patch?
> 
> Thanks, here you go.

> --- 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;
> +      }

The printed representation of xwidget objects should be documented in
the ELisp manual, under the "Editing Types" section.  In fact, we lack
a subsection there for xwidgets; it should be added.

Thanks.