tags 42801 patch
quit

Szunti <szunti@gmail.com> writes:

> 1) M-x customize-apropos RET inhibit RET
> 2) Toggled Inhibit Startup Screen's value:
> Stepped with TAB-s to Inhibit Startup Screen's arrow, RET to open the
> details, another TAB onto Toggle button and RET
> 3) Then typed C-x C-s, confirmed with yes RET
>
> After this the customization buffer refreshed and all options despite
> closed, got a State button with STANDARD value.
>
> S-TAB thrice to get onto the State button of the previous option
> (Inhibit Startup Echo Area Message) and after RET on the State button,
> the echo area tells,
>
> Symbol’s function definition is void: nil

Thanks for the bug report.

I can reproduce this bug in Emacs 26.3.  On current master, the bug manifests
differently: we don't get the State buttons, but we do get the message:
Symbol's function definition is void: nil

The difference lies in `custom-variable-modified-p' bugging out before we draw
the bogus State buttons for all options, because it is not supposed to handle
hidden widgets.

The bug is that Custom-save recalculates the state and redraws all widgets,
even the hidden ones.  I propose the attached patch, that changes
Custom-save to only act on edited widgets in the buffer.