Go to the first, previous, next, last section, table of contents.

6. Changing textual fonts and colors

6.1. How do I set the text, menu and modeline fonts?

Note that you should use `Emacs.' and not `Emacs*' when setting face values.

In `.Xdefaults':

Emacs.default.attributeFont:  -*-*-medium-r-*-*-*-120-*-*-m-*-*-* 
Emacs*menubar*font:           fixed
Emacs.modeline.attributeFont: fixed

This is confusing because modeline is a face, and can be found listed with all faces in the current mode by using M-x set-face-font (enter) ?. It uses the face specification of "attributeFont", while menubar is a normal X thing that uses the specification "font". With Motif it may be necessary to use "fontList" instead of "font". (Please rewrite this if you understand this better than me ... A general description of faces would be very useful. I am just saying that menubar is a FAQ because it's not a face and not listed.)

6.2. How can I set the background/foreground colors when highlighting a region?

You can change the face `zmacs-region' either in your `.Xdefaults':

Emacs.zmacs-region.attributeForeground: firebrick
Emacs.zmacs-region.attributeBackground: lightseagreen

or in your `.emacs':

(set-face-background 'zmacs-region "red")   
(set-face-foreground 'zmacs-region "yellow")

6.3. How can I set the most commonly used color options from my `.emacs' instead of from my `.Xdefaults'?

(set-face-background 'default "bisque")          ; frame background
(set-face-foreground 'default "black")           ; normal text
(set-face-background 'zmacs-region "red")   ; When selecting w/
                                                 ; mouse 
(set-face-foreground 'zmacs-region "yellow")
(set-face-font  'default "*courier-bold-r*120-100-100*")
(set-face-background 'highlight "blue")          ; Ie when selecting buffers 
(set-face-foreground 'highlight "yellow")
(set-face-background 'modeline "blue")           ; Line at bottom of buffer
(set-face-foreground 'modeline "white")
(set-face-font  'modeline "*bold-r-normal*140-100-100*")
(set-face-background 'isearch "yellow")          ; When highlighting while
                                                 ; searching		 
(set-face-foreground 'isearch "red")
(setq x-pointer-foreground-color "black")        ; Adds to bg color,
                                                 ; so keep black
(setq x-pointer-background-color "blue")         ; This is color you really
                                                 ; want ptr/crsr

6.4. Is there anyway to limit the number of available colors in the color map?

XEmacs 19.13 doesn't have such a mechanism (unlike netscape, or other color-hogs).


Go to the first, previous, next, last section, table of contents.