Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tired to explicitly set a custom face for a file using local file variables:

# Local Variables:
# buffer-face-mode-face:'(:family "DejaVu Sans Mono")
# End:

Emacs catches up these variables, not showing, however, the file with the font that was required.

How can I write down the variables, so Emacs would show files with particular faces?

share|improve this question

1 Answer

up vote 1 down vote accepted

After I found a hint on StackOverflow, that's one of the possible solutions:

# Local Variables:
# eval: (setq buffer-face-mode-face '(:family "DejaVu Sans Mono"))
# eval: (buffer-face-mode t)
# End:

Or this trick:

# Local Variables:
# eval: (setq buffer-face-mode-face (face-font 'fixed-pitch))
# eval: (buffer-face-mode t)
# End:
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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