I've been developing my own custom color theme, and it'd be really useful if I could get a list of font-faces affecting the text under the cursor.
Something like Textmate's show current scope command.
That would save me the trouble of doing M-x customize-face and looking through available options, guessing at which one affects the current word I'm on.
Any ideas?
There's a bug in the `what-face' code: the function takes "pos" as an argument but then doesn't use it when getting the face -- instead it uses "(point)", even though the message later claims pos in the "No face at %d" case.
M-x describe-face
You can define
what-face
with this code:After that,
will print the face found at the current point.
(Thanks to thedz for pointing out that
what-face
wasn’t built in.)what-cursor-position
with a prefix argument shows the face under point, among other information.Keyboard shortcut is C-u C-x =
Example output (the face property is shown in the last paragraph):
Trey's what face is on the right track. It led me to an email on a mailing list that had this: