customize

Send to Kindle
home » snippets » emacs » customize


font-lock-maximum-decoration

The variable font-lock-maximum-decoration specifies the preferred level of fontification, for modes that provide multiple levels. Level 1 is the least amount of fontification; some modes support levels as high as 3. The normal default is “as high as possible.” You can specify an integer, which applies to all modes, or you can specify different numbers for particular major modes; for example, to use level 1 for C/C++ modes, and the default level otherwise, use this:

(setq font-lock-maximum-decoration '((c-mode . 1) (c++-mode . 1)))

or

(setq font-lock-maximum-decoration t)

Fontification can be too slow for large buffers, so you can suppress it for buffers above a certain size. The variable font-lock-maximum-size specifies a buffer size, beyond which buffer fontification is suppressed.