Next: , Previous: Installation, Up: Introduction


1.2 Activation

To make sure files with extension .rec use rec-mode, add the following line to your .emacs file.

     (add-to-list 'auto-mode-alist '("\\.rec\\'" . rec-mode))

rec-mode buffers need font-lock to be turned on - this is the default in Emacs1.

With this setup, all files with extension ‘.rec’ will be put into rec mode. As an alternative, make the first line of a recfile look like this:

     # -*- mode: rec -*-

which will select rec-mode for this buffer no matter what the file's name is.


Footnotes

[1] If you don't use font-lock globally, turn it on in the rec buffer with (add-hook 'rec-mode-hook 'turn-on-font-lock)