[Top][All Lists]

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

Re: "clean" starting point for custom-theme-set-faces

From: Alex Kost
Subject: Re: "clean" starting point for custom-theme-set-faces
Date: Wed, 17 Sep 2014 15:41:44 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Sam Halliday (2014-09-17 14:00 +0400) wrote:

> Hi all,
> I'm creating a custom colour theme for emacs inspired by IntelliJ's Darcula. 
> Work in progress here:
> But there are a couple of things that confuse me about emacs faces, even 
> after reading the documentation and I'd appreciate some guidance:
> 1. When a theme is loaded, what are the default "inherit" values for all the 
> faces that I'm defining? Is there an implicit "inherit" based on what that 
> face was before the theme was loaded?
>    I've found that I need to override a lot of things with e.g. ":underline 
> nil" when actually I want to be defining my faces from a clean slate, 
> inheriting from "default" without having to explicitly write that.

IIUC you are faced with the old behavior of applying faces that will be
"fixed" in Emacs 24.4.  I wrote something about that here:

> 2. How do I re-use attributes inside custom-theme-set-faces? I can't put the 
> list of faces inside a (let ) because custom-theme-set-faces is expecting one 
> parameter per face. Ideally I'd like to define a bunch of things in some form 
> of data structure so that I don't have to repeat the values, and also so that 
> I can parametrise the theme. (e.g. I could have a function that returns my 
> theme with a permutation on font-lock colours)

I think you can do something like this:

(let ((faces `((default ...)
               (cursor  ...)
  (apply 'custom-theme-set-faces 'Darkula faces))

reply via email to

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