4.4.2 Faces

The following figure shows the full face tree defined by Clon. In fact, it is extracted from the theme file raw.cth (property specifications have been removed). By the way, that is why it is a good idea to start from this one when you want to create a new theme: all the faces are in there. It should be pretty easy to figure out what portion of text each face applies to.

;; Remember that everything in here belongs to the toplevel face.
:face (synopsis :face header
                :face program
                :face short-pack
                :face negated-pack
                :face options
                :face postfix)
:face text
:face (option :face (syntax :face (short :face name
                                         :face argument)
                            :face (long  :face name
                                         :face argument))
              :face (usage :face description
                           :face (fallback :face header
                                           :face value)
                           :face (default :face header
                                          :face value)
                           :face (environment :face header
                                              :face variable)))
:face (group :face header
             :face (items #| :face text :face option :face group |#))

As mentioned earlier, you can see that faces of the same name may appear at different places in the tree (e.g. the ‘header’ one) and hence may have different specifications, depending on the context (their branch in the tree).

Pushing this idea one step further, note the peculiarity of the ‘group’ face: since group items may be arbitrary text, options or even sub-groups, you can specify as many levels of group nesting as you want. In fact, you can spend your whole life specifying sub-groups, although it is very unlikely that a clonified application provides more than two or three levels of group imbrication.

One last point to note: you might be surprised to find empty face specifications like this one: ‘:face description’. This is a valid specification, and this is different from not mentioning the face at all, or specifying some properties explicitly. See Layout Inheritance for an explanation.