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

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

Re: How to change parameters for window colors?


From: Tim X
Subject: Re: How to change parameters for window colors?
Date: 01 Jun 2003 12:34:08 +1000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

>>>>> "Jimmerr" == Jimmerr  <address@hidden> writes:

 Jimmerr> Hi, I was unable to find any understandable explanation of
 Jimmerr> how to do this. I did find mention (I think in the int file
 Jimmerr> docs) of using an alist for features in your .emacs file,
 Jimmerr> such as (feature . value).  But I could find no explanation
 Jimmerr> at all on what the this means, how to do it, how to use it,
 Jimmerr> an example of the syntax, etc etc etc.  Although I searched
 Jimmerr> the docs for hours. Do I sound frustrated?

 Jimmerr> How do set preferences in emacs so windows open with the
 Jimmerr> colors I want?  I don't want to have to M-x
 Jimmerr> set-foreground-color and M-x set-background-color every time
 Jimmerr> I open a window, I'm sure there has to be a way to set
 Jimmerr> defaults like this.

 Jimmerr> If you know how to do it, can you please provide an example.

As with most things in emacs, there are numerous ways of doing
this. Some of them work better on some platforms than others. YOu
don't mention what platform you are running emacs on. Here are some
ways -

If running under X windows, you can use entries in your .Xresources
file. Something like -

emacs.Foreground: wheat
emacs.Background: black

or for setting individual faces, you can use syntax like
emacs.Face.AttributeCatagory: where catagory can be 
Foreground, Background, Family (font), Width, Height etc. e.g.
emacs.menu.attributeForeground: snow1
emacs.menu.attributeBackground: darkred
emacs.menu.attributeFamily: -xos4-terminus
emacs.menu.attributeHeight: 120
emacs.menu.attributeWidth: normal
emacs.menu.attributeWeight: bold

If your not running under X windows, then you can use M-x
customize-face <ret> [facename] <ret> where [facename] is one of the
emacs defined faces. Start with default e.g.

M-x customize-face <ret> default <ret>

This will open up a customize buffer with the details of the face
attributes which you can set/change. When you save the changes, they
will be written to your .emacs file and will be re-instated each time
you start emacs. You can get a buffer with all faces in it with

M-x customize-face <ret> <ret>

Another alternative is the command list-faces-display which opens up a
buffer which will show the names of all the defined faces and a sample
of what they are currently set to. Using the mouse, you can see either
a definition of the face or you can cause a customize buffer to be
opened for that face, which will allow you to change its
attributes/colours. 

Tim


reply via email to

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