5

If I make a table (with M-x table-insert), the background color is a dark blue, and the text color is a light grey. I'd like to make the face different, but I'm not sure what face I need to change.

The emacs documentation for tables doesn't say what the face is. I'd like to find the face used without having to look through all the Emacs code, so I can change it.

5

Move the point to the region of interest and enter C-u C-x =, ie the extended what-cursor-position that includes all the describe-char information, which includes the current active face for that character.

             position: 52052 of 94583 (55%), column: 3
            character: f (displayed as f) (codepoint 102, #o146, #x66)
    preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x66
               script: latin
               syntax: w    which means: word
             category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #x66
            file code: #x66 (encoded by coding system prefer-utf-8-unix)
              display: by this font (glyph code)
    xft:-unknown-Inconsolata-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x66)

Character code properties: customize what to show
  name: LATIN SMALL LETTER F
  general-category: Ll (Letter, Lowercase)
  decomposition: (102) ('f')

There are text properties here:
  face                 font-lock-keyword-face
  fontified            t

[back]

Following the link to the face (font-lock-keyword-face in my example) gives a buffer like this:

Face: font-lock-keyword-face (sample) (customize this face)

Documentation:
Font Lock mode face used to highlight keywords.

Defined in `font-lock.el'.

           Family: unspecified
          Foundry: unspecified
            Width: unspecified
           Height: unspecified
           Weight: bold
            Slant: unspecified
       Foreground: #F0DFAF
DistantForeground: unspecified
       Background: unspecified
        Underline: unspecified
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: unspecified
          Stipple: unspecified
             Font: unspecified
          Fontset: unspecified
          Inherit: unspecified

[back]

Which tells where the face was originally defined, and all of it's properties. This method allows discovery and customization of any font face used in Emacs that is accessible using the point, even in the minibuffer.

I'm not certain how to find the equivalent information for faces used in the modeline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.