]> gitweb.michael.orlitzky.com - nagios-mode.git/blob - README
README: various prose improvements.
[nagios-mode.git] / README
1 == What this is ==
2
3 Nagios-mode is an Emacs mode for editing Nagios configuration
4 files. Nagios is monitoring software that is configured via plain-text
5 (*.cfg) files. Those configuration files have a C-like syntax, and a
6 bunch of special keywords. Witin Emacs, nagios-mode will apply syntax
7 highlighting to them, possibly alerting you to the fact that you have
8 done something wrong, and making your buffers look pretty in any case.
9
10
11 == How to install it ==
12
13 Stick nagios-mode.el somewhere, and add that place to your Emacs load
14 path. For example,
15
16 (setq load-path
17 (append (list "~/.home/emacs/modes/nagios-mode/")
18 load-path))
19
20 is how I do it. With that in your load path, you just have to add
21 nagios-mode to your auto-load list,
22
23 (autoload 'nagios-mode "nagios-mode" nil t)
24
25 And tell Emacs to use it automatically when editing *.cfg files,
26
27 (setq auto-mode-alist
28 (append (list '("\\.cfg$" . nagios-mode))
29 auto-mode-alist))
30
31 which works great so long as you don't work with any other *.cfg files
32 that have a different syntax.
33
34
35 == How it works ==
36
37 The macros and object definitions are parsed from the Nagios source
38 code. Object definitions are found within xdata/xodtemplate.h, while
39 the macros are cleverly hidden within include/macros.h. Once they have
40 been parsed, they are cuth and pasteth in to nagios-mode.
41
42 The directives (or variables) are another story. There is no obvious
43 way to parse the object variables from the source code. So, it's done
44 the old-fashioned way: I use nagios-mode until I notice that one of my
45 variables isn't highlighted. Then I add it. You can mail me these and
46 I will probably add them.
47
48
49 == Bugs et cetera ==
50
51 Send all bug reports, feature requests, and unprompted criticism to
52 michael@orlitzky.com.