Subject: bug#45428: 27.1; (quote (quote (quote ...))) unexpectedly works as anonymous face

From: Eli Zaretskii <[email-masked]>
Date: Tue, 29 Dec 2020 21:39:29 +0200

> Date: Tue, 29 Dec 2020 10:27:11 -0800 (PST)
> From: Drew Adams <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked],
>         [email-masked]
> 
> Indeed.  I thought that's what you might say.  Yes,
> that description is fine.  But I hope you'll recognize
> that the (quote (quote '(...))) example is a gotcha,
> especially given that the "Invalid face reference:
> quote" message is shown in *Messages* only after some
> action provokes redisplay, and it often is not seen
> in the echo area.  Without your having piped up here
> to say "Please look in *Messages*" I wouldn't have
> noticed it, for example.

We cannot signal an error from redisplay, so all we can do is log the
error in *Messages*.  We do that with any error inside redisplay,
there's nothing new here.

> Better still perhaps, instead of trying to address
> the specific `quote' gotcha (which is particularly
> misleading), the "Invalid face..." interaction could
> perhaps be improved.  If that msg were (1) more
> visible and immediate and (2) said more about what
> is invalid (even just pointing out that here `quote'
> is taken as a face name or whatever), that might help.

Patches to make the diagnostics in this case are welcome.  The code
that implements the face merging and deals with these forms is quite
simple, and doesn't really know what's wrong with the face in this
case, it just knows it's invalid.