Subject: Re: bug#51595: 26.3; Face attribute value `unspecified' in `defface' breaks Customize UI

From: Eli Zaretskii <[email-masked]>
Date: Thu, 04 Nov 2021 08:49:54 +0200

> From: Drew Adams <[email-masked]>
> Date: Wed, 3 Nov 2021 21:09:41 +0000
> 
> emacs -Q
> 
> (defface foo '((t :background "LightBlue")) "DOC ..." :group 'faces)
> (defface bar '((t :foreground unspecified :background "LightBlue"))
>   "DOC..." :group 'faces)

Don't do that.  Using 'unspecified' in user code is an error.  Patches
to the docs to that effect are welcome.

> The doc (Elisp manual) draws no such distinction - speaks of no such
> limitation.  It just lists `unspecified' as one of the possible face
> attributes:
> 
>   "Apart from the values given below, each face attribute can have the
>    value 'unspecified'."

"Can have" is a notice to Lisp programmers to expect such a value, it
is not an invitation to use it in defface or any other face specs.
the correct way of not specifying a value is to use nil or (better)
not to mention the attribute at all.  Think about how Emacs merges
faces, and you will understand why.