Appendix A. Editing CFEngine 3 Configurations in Emacs
If you are an Emacs user, you will not be surprised to learn that there is an Emacs mode for editing CFEngine configuration files. In this Appendix you will learn how to set up and use the CFEngine editing mode in Emacs.
You need GNU Emacs 23.1 or higher. Earlier versions or XEmacs may work as well, but have not been extensively tested.
First, you need to download cfengine.el from https://raw.github.com/cfengine/core/master/contrib/cfengine.el. Emacs currently includes an older version of this file. Emacs 24.2 and higher, when released, will include the latest version, but 24.1 and earlier do not, so you need to manually download it.
Assuming you have downloaded the library to your computer, you can add it to your load path. Follow the generic instructions from the Emacs wiki, or just put the following code in your .emacs file:
"cfengine editing"t) (
You will probably want to tell Emacs to associate .cf files with the
cfengine-mode, although that could cause
problems if you use other files ending with .cf. See http://www.emacswiki.org/emacs/AutoModeAlist for more
information or just add the following line to your .emacs file:
If you use other files ending with .cf and would prefer not to associate this
cfengine-mode by default, ...