Subject: Themes can't work right due to design

From: Chris Hanson <[email-masked]>
Date: Sun, 4 Dec 2011 22:54:09 -0800

I've just started using Emacs 24 (pretest 3), and have run into
problems getting Zenburn to work right.  Previously in Emacs 23 I used
the color-theme package and a zenburn theme designed for that package.
 It needed a little tweaking but is otherwise fine.

In Emacs 24, using custom-theme and a similar zenburn theme designed
for that package, I'm having trouble getting the theme to work
properly.

I believe there are two underlying problems causing this behavior.

The first is that :inherit isn't very useful as a way to say "make the
current face like the specified one".  Because color-theme clobbers
face-defface-spec, it effectively erases any previous face settings,
so that the theme settings are self-contained.  There is no equivalent
way to do this with custom-theme, which has led me to write things
like `(font-lock-type-face ,zenburn-primary-3) rather than
`(font-lock-type-face ((t (:inherit zenburn-primary-3)))) .  This
works but is somewhat unsatisfying.

The second is that a face attribute that's explicitly set can't be
overridden by a custom theme, for reasons I'm not completely clear on.
 For example, "cc-fonts.el" contains (set-face-foreground
'c-annotation-face "blue") and the theme doesn't seem to be able to
override this foreground under any circumstances, even with an
explicitly set :foreground attribute.  This just seems like a bug.

I'll probably just go back to using color-theme, since at least it
works.  I was hoping that Emacs 24 would allow me get good behavior
without it, but alas...

Let me know if you need help debugging anything.