Subject: bug#40336: default face spec doesn't get overriden

From: Bad Blue Bull <[email-masked]>
Date: Tue, 31 Mar 2020 01:38:40 +0300

Maybe I'm getting something wrong.

> ‘default’
> This element of SPEC doesn’t match any terminal; instead, it
> specifies defaults that apply to all terminals. This element,
> if used, must be the first element of SPEC. Each of the
> following elements can override any or all of these defaults.

(progn
  (face-spec-set 'zzz
		 '((default  :background "red")
		   (((background dark)) :weight bold :background "black" :foreground "White"  )
		   (((background light)) :weight bold :background "yellow" :foreground "Black"  )
		   ))

  (insert (propertize "XXX" 'face 'zzz)))

Eval it and see default background gets applied despite it should be overriden by a spec line that matches terminal's background.