Next: , Previous: , Up: Emacs Interface   [Contents][Index]


3.12.2 Basic Configuration

If the following lines are not present in ~/.emacs, then we suggest they are added, so that the font-lock mode (syntax coloring support) is enabled for all major modes in Emacs that support it.

(global-font-lock-mode t)       ; GNU Emacs
(setq font-lock-auto-fontify t) ; XEmacs
(setq font-lock-maximum-decoration t)

These settings and more are also available through M-x customize-group RET font-lock.

If one wants to add font-locking only to the Prolog mode, then the two lines above could be replaced by:

(add-hook 'prolog-mode-hook 'turn-on-font-lock)

Similarly, to turn it off only for Prolog mode use:

(add-hook 'prolog-mode-hook 'turn-off-font-lock)

Send feedback on this subject.