Subject: bug#37774: 27.0.50; new :extend attribute broke visuals of all themes and other packages

From: Eli Zaretskii <[email-masked]>
Date: Thu, 05 Dec 2019 17:47:29 +0200

> Cc: [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> Date: Thu, 5 Dec 2019 03:44:22 +0200
> 
> The new definition for diff-added would look like:
> 
>    (defface diff-added
>      '((default
>         :inherit diff-changed)
>        (((class color) (min-colors 257) (background light))
>         :background "#eeffee")
>        (((class color) (min-colors 88) (background light))
>         :background "#ddffdd")
>        (((class color) (min-colors 88) (background dark))
>         :background "#335533")
>        (((class color))
>         :foreground "green"))
>      "`diff-mode' face used to highlight added lines.")
> 
>    (put 'diff-added 'face-transient-spec '((t :extend t)))

OK, and how will this work to countermand the problem with themes?

custom-theme-set-faces calls face-spec-set, which calls
face-spec-recalc, which starts by resetting all face attributes to
'unspecified'.  And the last 2 functions are general-purpose, not
specific to themes.