[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

38.12.6 Functions for Working with Faces

Here are additional functions for creating and working with faces.

Function: make-face name

This function defines a new face named name, initially with all attributes nil. It does nothing if there is already a face named name.

Function: face-list

This function returns a list of all defined face names.

Function: copy-face old-face new-name &optional frame new-frame

This function defines a face named new-name as a copy of the existing face named old-face. It creates the face new-name if that doesn't already exist.

If the optional argument frame is given, this function applies only to that frame. Otherwise it applies to each frame individually, copying attributes from old-face in each frame to new-face in the same frame.

If the optional argument new-frame is given, then copy-face copies the attributes of old-face in frame to new-name in new-frame.

Function: face-id face

This function returns the face number of face face.

Function: face-documentation face

This function returns the documentation string of face face, or nil if none was specified for it.

Function: face-equal face1 face2 &optional frame

This returns t if the faces face1 and face2 have the same attributes for display.

Function: face-differs-from-default-p face &optional frame

This returns non-nil if the face face displays differently from the default face.

A face alias provides an equivalent name for a face. You can define a face alias by giving the alias symbol the face-alias property, with a value of the target face name. The following example makes modeline an alias for the mode-line face.

 
(put 'modeline 'face-alias 'mode-line)

[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.