Next: , Previous: , Up: Miscellaneous  


5.0: Major & Minor Modes

Q5.0.1: How can I do source code highlighting using font-lock?

For most modes, font-lock is already set up and just needs to be turned on. This can be done by adding the line:

(require 'font-lock)

to your init.el. You can turn it on for the current buffer and session only by M-x font-lock-mode. See the file etc/sample.init.el for more information.

See also Syntax Highlighting from the Options menu. Remember to save options.