Laboratory in Software Engineering

Spring 2000


Java Text Coloring In Emacs

Emacs can color your java code to make it easier to find errors. If you want to put color onto a Java file that you are editing, you simply use the Emacs command:

Meta-x font-lock-mode

If you want this done permanently to every .java file you edit in Emacs, you simply add the following line to the .emacs file in your home directory:

(setq java-mode-hook '(lambda () (font-lock-mode 1)))

Note that this does not alter the code you are writing in any way, Emacs only colors it so it is pretty to look at.


Back to the 6.170 home page

Last modified: Mon Jan 31 16:16:38 EST 2000