There are 4 regions where text may be displayed in Emacs, here is what
you can do to inspect each of them.
- The mode-line: See the value of
mode-line-format
.
- The header-line: See the value of
header-line-format
.
- Buffer: If the face is in a region of the buffer you can't reach, see the value of
(buffer-string)
.
- Minibuffer: If point is currently in the minibuffer, you can do
M-: (buffer-string)
, and that will describe the contents of the minibuffer.
You may need to (setq enable-recursive-minibuffers to t)
first.
- Fringe or Margin: None that I know of.
These methods will give you the entire contents of these regions, so
it may take some reading to actually find the face you're looking for,
but it will certainly be there. Most importantly, it will describe even regions you cannot reach.
For instance, let's say I want to know
which face is used in the find-file
prompt.
- Invoke find-file with
C-x C-f
.
- Describe the minibuffer with
M-: (buffer-string)
That will give something like the following output, and right there at
the end is the face I was looking for.
#("Find file: ~/" 0 11 (front-sticky t rear-nonsticky t field t read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))