bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5358: 23.1; Adding comment loses customizations in progress


From: Mauro Aranda
Subject: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 6 Sep 2019 11:47:57 -0300

The possibility to preserve the customizations in progress is already
present in the customize machinery, but for some reason it wasn't used
in this case.

I propose a patch that makes use of the :shown-value property of the
custom-variable and custom-face widgets, thus allowing to preserve the
customizations in progress when redrawing a widget.

Since after redrawing customize recomputes the state of the widget, it
is necessary to check if the widget was modified.  That isn't
possible with `custom-variable-state' or `custom-face-state',
because they are pretty "widget unaware".  So I added a check in
`custom-variable-state-set' and `custom-face-state-set' to catch this
situation.

Finally, to be able to use the value of the widget in
`custom-face-state-set', it is necessary to rearrange the final part of
`custom-face-value-create'.  Namely, add the children to the :children
property, before calling `custom-face-state-set'.

Best regards,
Mauro.

Attachment: 0001-Don-t-discard-customizations-in-progress-when-adding.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]