[Top][All Lists]

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

RE: custom-set-faces

From: Drew Adams
Subject: RE: custom-set-faces
Date: Sat, 10 May 2008 11:22:56 -0700

> > That said, there is also no special reason to use 
> > `custom-set-faces' to do what
> > you want, unless you find it more convenient.
> I'm only using custom-set-faces because that's what color-theme.el was
> doing.  I've since ditched color theme, and just do it myself.
> What's the more appropriate function to use?

Perhaps I misspoke. It depends on what you want/need. If you want to do
everything that `custom-set-faces' does, then that is appropriate.

If you just want to change some attributes of a given face for the current
session, then you can use `set-face-attribute'.

See node Attribute Functions in the Elisp manual.

You might also want to take a look at `face-spec-set' and `face-spec-set-2',
which each accept as argument the kind of face spec that `custom-set-faces'
deals with (which you therefore have already).

Again, I didn't mean to imply that you should not use `custom-set-faces' for
this. But keep in mind that it interacts with Customize - that's what it's
designed for. If you never use Customize, then you don't care about that, but if
you do, then at least be aware of it.

All that said, I would offer this general suggestion: Customize is your friend.
Even if you find it ugly or a little inconvenient to use, it has some powerful
type-checking and other features that can help you. The baby is admittedly
sometimes hard to see in the murky bathwater.

reply via email to

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