From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Trying to define face dynamically
Date: Thu, 17 Oct 2019 22:30:55 +0300 [thread overview]
Message-ID: <834l079nkg.fsf@gnu.org> (raw)
In-Reply-To: <87pnivnqxh.fsf@telefonica.net> (message from Óscar Fuentes on Thu, 17 Oct 2019 20:54:34 +0200)
> From: Óscar Fuentes <ofv@wanadoo.es>
> 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?
next prev parent reply other threads:[~2019-10-17 19:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 18:54 Trying to define face dynamically Óscar Fuentes
2019-10-17 19:30 ` Eli Zaretskii [this message]
2019-10-17 19:54 ` Óscar Fuentes
2019-10-18 0:15 ` Óscar Fuentes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834l079nkg.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.