Subject: bug#14635: 24.3.50; Regression in Customize: no revert changes

From: Eli Zaretskii <[email-masked]>
Date: Fri, 30 Oct 2020 15:43:22 +0200

> From: Mauro Aranda <[email-masked]>
> Date: Fri, 30 Oct 2020 10:35:33 -0300
> Cc: [email-masked]
> 
> For the default face, face-spec-reset-face only sets all attributes to
> default values if (display-graphic-p frame) returns nil.  So on a
> graphical display, it never resets :family, :foundry, :width, :height,
> :weight, :slant, :foreground and :background.

That's because on GUI frames there's no real default for these
attributes (unlike on a TTY where we inherit the colors of the
terminal).  So we simply _cannot_ reset the attributes like that,
because there's nothing to reset to.  E.g., unspecified-fg only has
meaning on a TTY frame.

> What would be the right way for face-spec-reset-face to reset all the
> attributes of the default face to the default values, in a graphic
> display?

Doesn't customizing a face record the original value in some property
of the face symbol?  If so, reverting the customizations should use
those recorded values, I think.