GNU Emacs Manual. Node: Fast or Lazy

PREVLazy Lock Mode UPSupport Modes next

15.15.3: Fast Lock or Lazy Lock?

Here is a simple guide to help you choose one of the Font Lock support modes.

The variable font-lock-support-mode specifies which of these support modes to use; for example, to specify that Fast Lock mode is used for C/C++ modes, and Lazy Lock mode otherwise, set the variable like this:

(setq font-lock-support-mode
      '((c-mode . fast-lock-mode) (c++-mode . fast-lock-mode)
        (t . lazy-lock-mode)))
PREVLazy Lock Mode UPSupport Modes next