[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47437: 28.0.50; pulse-momentary-highlight-overlay breaks if backgrou
From: |
Eli Zaretskii |
Subject: |
bug#47437: 28.0.50; pulse-momentary-highlight-overlay breaks if background color is inherited |
Date: |
Sun, 28 Mar 2021 15:31:31 +0300 |
> From: Ingo Lohmar <ingo.lohmar@posteo.net>
> 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.