GNU bug report logs - #69941
30.0.50; Faulty fontification of radio button widgets

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Fri, 22 Mar 2024 15:01:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 69941-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#69941: 30.0.50; Faulty fontification of radio button widgets
Date: Sun, 9 Feb 2025 08:41:52 -0300
Stephen Berman <stephen.berman <at> gmx.net> writes:

> On Sun, 9 Feb 2025 07:42:36 -0300 Mauro Aranda 
<maurooaranda <at> gmail.com> wrote:
>
>> Stephen Berman <stephen.berman <at> gmx.net> writes:
>>
>>> On Sat, 8 Feb 2025 20:50:20 -0300 Mauro Aranda <maurooaranda <at> gmail.com>
>>  wrote:
>>>> So, modifying an inactive widget right at the start or at the end 
of the
>>>> overlay can produce this effect.
>>>>
>>>> I don't think we can solve it easily like my patch did with the :from
>>>> and :to markers, though.  But here's an idea:
>>>>
>>>> When a widget is already inactive (i.e., it has an :inactive 
property),
>>>> instead of doing nothing we make sure to move the overlay so that it
>>>> includes again all the widget, from the :from marker to the :to 
marker.
>>>>
>>>> If we do that, we should document that if some code modifies an
>>>> :inactive widget, it has to call again :deactivate.
>>>>
>>>> I attach a patch with that idea, together with documentation 
changes and
>>>> a new test.
>>>
>>> Thanks, I confirm this fixes the remaining misfontification. However,
>>> if I switch the order of the last two lines above -- i.e, first
>>> deactivate the radio widget and then set its value to the empty
>>> string -- then I see the same misfontification of radio button "One"
>>> that still occurs in emacs-30 (i.e. without both this patch and your
>>> previous one).  Is this expected, and if so, can you explain why?
>>>
>>
>> Isn't that what I described? I mean, if you first deactivate and then
>> you change the value, you're modifying an already inactive widget, and
>> now the documentation says that if you do that, you should make sure the
>> :deactivate function runs again...
>
> Right, thanks.  I was too eager to test your patch and just glanced at
> your doc changes without really trying to understand them (or your
> comments above).  Sorry, mea culpa.

No problem!






This bug report was last modified 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.