Subject: Re: bug#47437: 28.0.50; pulse-momentary-highlight-overlay breaks if background color is inherited
From: Eli Zaretskii <[email-masked]>
To: Ingo Lohmar <[email-masked]>
Cc: [email-masked]
Date: Sun, 28 Mar 2021 15:31:31 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Ingo Lohmar <[email-masked]>
> Date: Sat, 27 Mar 2021 22:34:46 +0100
> 
> 
> The bug surfaces after setting the pulse highlight face by inheriting
> from other faces (no explicit background attribute), for example like
> this:
> 
> (custom-set-faces
>  '(pulse-highlight-start-face ((t (:inherit highlight))) 'new))
> 
> I do this as I employ a restricted set of color faces from which all
> others inherit.  With the above setting, run `xref-find-definitions'
> (M-.) on an elisp symbol.  This triggers
> `pulse-momentary-highlight-overlay', which fails at
> 
>     (color-name-to-rgb
>      (face-background 'pulse-highlight-start-face))
> 
> because the background attribute is `nil'.  Adding the "inherit"
> argument works, at least in the above case:
> 
>     (color-name-to-rgb
>      (face-background 'pulse-highlight-start-face nil t))

Thanks, I made that change on master now, except that I used 'default'
instead of t, to make sure the returned value is always a color name.