help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to define face dynamically


From: Eli Zaretskii
Subject: Re: Trying to define face dynamically
Date: Thu, 17 Oct 2019 22:30:55 +0300

> From: Óscar Fuentes <address@hidden>
> Date: Thu, 17 Oct 2019 20:54:34 +0200
> 
> (mapcar (lambda (face)
>            (face-remap-add-relative
>               face `(:filtered (:window has-keyboard-focus nil)
>                      :background ,(color-darken-name
>                                    (face-attribute face :background)
>                                  10.0))))
>     '(default fringe))
> 
> But this has not the desired effect: faces remain the same and every now
> and then Emacs throws an error "wrong-type-argument stringp nil" from
> functions such as font-info.
> 
> What I'm doing wrong?

You didn't say what color-darken-name does, but I think the problem is
that ':background "foo"' is not a face spec.  Did you try something
like '(background-color . ,(color-darken-name ...))' or maybe
'(:background ,(color-darken-name ...))' instead?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]