Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets

From: Stefan Monnier <[email-masked]>
Date: Mon, 13 May 2024 10:19:43 -0400

>> Or maybe `widget-*-add-item` should temporarily change the insertion
>> type of the from/to markers?
> What do you mean by "temporarily"?

I think you underestimated the meaning of:

    I'm really not familiar with the widget code

I put "really" before the "not", because I know very little about
that code.

> Maybe it could be left up to the deactivation code to ensure that the
> radio-button-choice widget's :from and the :from of its first child
> coincide when deactivation (and accompanying fontification) occurs, and
> then reset the previous values afterwards.

I suspect thinking in terms of "activation/deactivation" will not
be helpful.  We should look at the code which does the insertion of text
(which presumably happens, among other things, upon deactivation).

> Though that seems pretty ad hoc...

If needed, we might be able to make it less ad-hoc by defining
a function for the purpose of (re)inserting text inside an
existing widget.

> (and would resetting the :from affect the fontification?)

It'd be up to that new function to make sure things work as they should.

        Stefan