How do I enable color syntax highlighting in Emacs (font-lock)?
Font-lock mode is a mode that performs color syntax highlighting for other major modes in Emacs. To use font-lock, place the following in your startup file: (cond ((fboundp ‘global-font-lock-mode) ;; Turn on font-lock in all modes that support it (global-font-lock-mode t) ;; Maximum colors (setq font-lock-maximum-decoration t))) The above code uses the default faces for decoration. If you would like to customize the attributes of the faces, you can use the following startup code to get started: (cond ((fboundp ‘global-font-lock-mode) ;; Customize face attributes (setq font-lock-face-attributes ;; Symbol-for-Face Foreground Background Bold Italic Underline ‘((font-lock-comment-face “DarkGreen”) (font-lock-string-face “Sienna”) (font-lock-keyword-face “RoyalBlue”) (font-lock-function-name-face “Blue”) (font-lock-variable-name-face “Black”) (font-lock-type-face “Black”) (font-lock-reference-face “Purple”) )) ;; Load the font-lock package. (require ‘font-lock) ;; Maximum colors (setq font-