Trevor Spiteri <tspiteri@ieee.org> writes:

> 1. Run emacs -Q
> 2. Fill the *scratch* buffer with some text (350 characters is enough).
> 3. M-x customize-option-other-window abbrev-all-caps
> 4. C-x o (to switch back to *scratch* buffer window)
> 5. Click on "Toggle" button right next to "Abbrev All Caps"
>
> The text " [ State ]: EDITED, shown value does not take effect until
> you set or save it.\n" (81 characters including new line) is inserted at
> point 298 in the scratch buffer, overwriting 29 characters in the
> process. 298 is also the point at which the State button is drawn in the
> custom buffer. The custom-mode window is also broken: the State button
> now appears as regular text.
>

I think the proposed patches in Bug#40788 would solve this problem as
well.