]> gitweb.michael.orlitzky.com - nagios-mode.git/blob - nagios-mode.el
Rename pos-offset to point-offset.
[nagios-mode.git] / nagios-mode.el
1 ;;
2 ;; nagios-mode, an Emacs mode for Nagios <http://www.nagios.org/>
3 ;; configuration files.
4 ;;
5 ;; Copyright Michael Orlitzky
6 ;;
7 ;; http://michael.orlitzky.com/
8 ;;
9 ;; This program is free software: you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation, either version 3 of the License, or
12 ;; (at your option) any later version.
13 ;;
14 ;; This program is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
18 ;;
19 ;; http://www.fsf.org/licensing/licenses/gpl.html
20 ;;
21
22 (require 'font-lock)
23 (require 'regexp-opt)
24
25
26 ;; Custom Variables
27
28 (defcustom nagios-indent-level 2
29 "Number of spaces in one indentation (tab)."
30 :type 'integer :group 'nagios
31 )
32
33
34
35 ;; Indentation Voodoo
36
37 (defun nagios-indent-line(&optional flag)
38 "Indents a line, taking nesting into account."
39 (interactive)
40 (nagios-indent-to (nagios-calculate-indent))
41 )
42
43
44 (defun beginning-of-line-pos()
45 ;; Return the point position corresponding to the beginning
46 ;; of the current line.
47 (save-excursion
48 (beginning-of-line)
49 (point)
50 )
51 )
52
53 (defun end-of-line-pos()
54 ;; Return the point position corresponding to the end
55 ;; of the current line.
56 (save-excursion
57 (end-of-line)
58 (point)
59 )
60 )
61
62 (defun point-offset()
63 ;; How far are we from the beginning of the line?
64 (- (point) (beginning-of-line-pos))
65 )
66
67 (defun first-char-offset()
68 ;; How far is the first character on this line
69 ;; from the beginning of the line?
70 (save-excursion
71 (+ (pos-offset) (skip-chars-forward " \t"))
72 )
73 )
74
75 (defun first-char-pos()
76 ;; What's the position of the first character on this line?
77 (+ (beginning-of-line-pos) (first-char-offset))
78 )
79
80 (defun nagios-indent-to(indent-column)
81 "Indent the current line to column indent-column."
82
83 ;; Store the point in orig-pos.
84 (let ((orig-point (point)))
85
86 ;; And store the offset of the first character (with respect to the
87 ;; beginning of the line) in orig-first-char-offset.
88 (let ((orig-first-char-offset (first-char-offset)))
89
90 ;; Delete any leading whitespace, and move the point to the
91 ;; beginning of the line.
92 (delete-region (beginning-of-line-pos) (first-char-pos))
93 (beginning-of-line)
94
95 ;; Now insert indent-column spaces.
96 (while (< 0 indent-column)
97 (insert " ")
98 (setq indent-column (- indent-column 1)))
99
100 ;; The text on the current line just moved left/right some amount;
101 ;; call it text-delta. We want to move the point that same distance.
102 (let ((text-delta (- (first-char-offset) orig-first-char-offset)))
103 (goto-char (+ orig-point text-delta))
104 )
105 )
106 )
107 )
108
109
110
111 (defun last-opening-brace()
112 ;; Get the position of the last opening brace, with
113 ;; respect to the current point.
114 (save-excursion
115 (let ((lob (re-search-backward "{" nil t)))
116 (if lob
117 lob
118 -1)
119 )
120 )
121 )
122
123 (defun last-closing-brace()
124 ;; Get the position of the last closing brace, with
125 ;; respect to the current point.
126 (save-excursion
127 (let ((lcb (re-search-backward "}" nil t)))
128 (if lcb
129 lcb
130 -1)
131 )
132 )
133 )
134
135 (defun nagios-in-block()
136 "Determine if the point is inside of a {} block."
137
138 ;; If the last brace seen in the buffer is an opening brace, we're
139 ;; in a block. Otherwise, we aren't.
140 (if (>= (last-closing-brace) (last-opening-brace))
141 nil
142 t)
143 )
144
145
146 (defun brace-on-line()
147 ;; Is there a curly brace on this line?
148 (save-excursion
149 (re-search-forward "[{}]" (end-of-line-pos) t)
150 )
151 )
152
153 (defun nagios-calculate-indent()
154 "Calculate the level of indentation."
155 ;; We're either inside a block, or we aren't.
156
157 ;; Initialize the indent variable to either nagios-indent-level
158 ;; or 0 depending on whether or not we're in a block.
159 (let ((indent (if (nagios-in-block)
160 (setq indent nagios-indent-level)
161 0)
162 )
163 )
164
165 ;; Set the indentation level to 0 if we find either brace on this
166 ;; line.
167 (if (brace-on-line)
168 (setq indent 0)
169 )
170
171 indent
172 )
173 )
174
175
176 ;; Keymaps
177
178 (defun nagios-insert-right-brace-and-indent()
179 "Insert a '}' character, and indent the line."
180 (interactive)
181 (insert "}")
182 (nagios-indent-line)
183 )
184
185
186 (defvar nagios-mode-map()
187 "Keymap used in nagios mode.")
188
189 (when (not nagios-mode-map)
190 (setq nagios-mode-map (make-sparse-keymap))
191 (define-key nagios-mode-map
192 (read-kbd-macro "}")
193 'nagios-insert-right-brace-and-indent)
194 )
195
196
197
198 (defconst nagios-directives
199 (eval-when-compile
200 (concat "^[ \t\r\n]*"
201
202 (regexp-opt
203 '("active_checks_enabled" "address" "alias" "check_command"
204 "check_freshness" "check_interval" "check_period" "checks_enabled"
205 "command_line" "command_name" "contactgroups" "contact_groups"
206 "contactgroup_members" "contact_name" "contactgroup_name" "contacts"
207 "dependent_host_name" "dependent_service_description" "email"
208 "event_handler" "event_handler_enabled" "execution_failure_criteria"
209 "failure_prediction_enabled" "first_notification"
210 "first_notification_delay" "flap_detection_enabled" "freshness_threshold"
211 "friday" "high_flap_threshold" "host_name" "host_notification_commands"
212 "host_notification_options" "host_notification_period"
213 "host_notifications_enabled" "hostgroup_name" "hostgroups"
214 "is_volatile" "last_notification" "low_flap_threshold"
215 "max_check_attempts" "members" "monday" "normal_check_interval"
216 "notes" "notification_failure_criteria"
217 "notification_interval" "notification_options"
218 "notification_period" "notifications_enabled"
219 "obsess_over_service" "pager" "parallelize_check"
220 "parents" "passive_checks_enabled"
221 "process_perf_data" "retain_nonstatus_information"
222 "retain_status_information" "retry_check_interval"
223 "retry_interval" "saturday" "service_description"
224 "service_notification_commands" "service_notification_options"
225 "service_notification_period" "service_notifications_enabled"
226 "servicegroup_name" "stalking_options"
227 "sunday" "thursday" "timeperiod_name" "tuesday" "wednesday") t)
228
229 "[ \r\n\t]+")
230 )
231 )
232
233
234
235 (defconst nagios-macros
236 (eval-when-compile
237 (regexp-opt
238 '("$ADMINEMAIL$"
239 "$ADMINPAGER$"
240 "$ARG1$"
241 "$ARG10$"
242 "$ARG11$"
243 "$ARG12$"
244 "$ARG13$"
245 "$ARG14$"
246 "$ARG15$"
247 "$ARG16$"
248 "$ARG17$"
249 "$ARG18$"
250 "$ARG19$"
251 "$ARG2$"
252 "$ARG20$"
253 "$ARG21$"
254 "$ARG22$"
255 "$ARG23$"
256 "$ARG24$"
257 "$ARG25$"
258 "$ARG26$"
259 "$ARG27$"
260 "$ARG28$"
261 "$ARG29$"
262 "$ARG3$"
263 "$ARG30$"
264 "$ARG31$"
265 "$ARG32$"
266 "$ARG4$"
267 "$ARG5$"
268 "$ARG6$"
269 "$ARG7$"
270 "$ARG8$"
271 "$ARG9$"
272 "$COMMANDFILE$"
273 "$CONTACTALIAS$"
274 "$CONTACTEMAIL$"
275 "$CONTACTGROUPALIAS$"
276 "$CONTACTGROUPMEMBERS$"
277 "$CONTACTGROUPNAME$"
278 "$CONTACTGROUPNAMES$"
279 "$CONTACTNAME$"
280 "$CONTACTPAGER$"
281 "$DATE$"
282 "$EVENTSTARTTIME$"
283 "$HOSTACKAUTHOR$"
284 "$HOSTACKAUTHORALIAS$"
285 "$HOSTACKAUTHORNAME$"
286 "$HOSTACKCOMMENT$"
287 "$HOSTACTIONURL$"
288 "$HOSTADDRESS$"
289 "$HOSTALIAS$"
290 "$HOSTATTEMPT$"
291 "$HOSTCHECKCOMMAND$"
292 "$HOSTCHECKTYPE$"
293 "$HOSTDISPLAYNAME$"
294 "$HOSTDOWNTIME$"
295 "$HOSTDURATION$"
296 "$HOSTDURATIONSEC$"
297 "$HOSTEVENTID$"
298 "$HOSTEXECUTIONTIME$"
299 "$HOSTGROUPACTIONURL$"
300 "$HOSTGROUPALIAS$"
301 "$HOSTGROUPMEMBERS$"
302 "$HOSTGROUPNAME$"
303 "$HOSTGROUPNAMES$"
304 "$HOSTGROUPNOTES$"
305 "$HOSTGROUPNOTESURL$"
306 "$HOSTLATENCY$"
307 "$HOSTNAME$"
308 "$HOSTNOTES$"
309 "$HOSTNOTESURL$"
310 "$HOSTNOTIFICATIONID$"
311 "$HOSTNOTIFICATIONNUMBER$"
312 "$HOSTOUTPUT$"
313 "$HOSTPERCENTCHANGE$"
314 "$HOSTPERFDATA$"
315 "$HOSTPERFDATAFILE$"
316 "$HOSTPROBLEMID$"
317 "$HOSTSTATE$"
318 "$HOSTSTATEID$"
319 "$HOSTSTATETYPE$"
320 "$ISVALIDTIME$"
321 "$LASTHOSTCHECK$"
322 "$LASTHOSTDOWN$"
323 "$LASTHOSTEVENTID$"
324 "$LASTHOSTPROBLEMID$"
325 "$LASTHOSTSTATE$"
326 "$LASTHOSTSTATECHANGE$"
327 "$LASTHOSTSTATEID$"
328 "$LASTHOSTUNREACHABLE$"
329 "$LASTHOSTUP$"
330 "$LASTSERVICECHECK$"
331 "$LASTSERVICECRITICAL$"
332 "$LASTSERVICEEVENTID$"
333 "$LASTSERVICEOK$"
334 "$LASTSERVICEPROBLEMID$"
335 "$LASTSERVICESTATE$"
336 "$LASTSERVICESTATECHANGE$"
337 "$LASTSERVICESTATEID$"
338 "$LASTSERVICEUNKNOWN$"
339 "$LASTSERVICEWARNING$"
340 "$LOGFILE$"
341 "$LONGDATETIME$"
342 "$LONGHOSTOUTPUT$"
343 "$LONGSERVICEOUTPUT$"
344 "$MAINCONFIGFILE$"
345 "$MAXHOSTATTEMPTS$"
346 "$MAXSERVICEATTEMPTS$"
347 "$NEXTVALIDTIME$"
348 "$NOTIFICATIONAUTHOR$"
349 "$NOTIFICATIONAUTHORALIAS$"
350 "$NOTIFICATIONAUTHORNAME$"
351 "$NOTIFICATIONCOMMENT$"
352 "$NOTIFICATIONISESCALATED$"
353 "$NOTIFICATIONNUMBER$"
354 "$NOTIFICATIONRECIPIENTS$"
355 "$NOTIFICATIONTYPE$"
356 "$OBJECTCACHEFILE$"
357 "$PROCESSSTARTTIME$"
358 "$RESOURCEFILE$"
359 "$RETENTIONDATAFILE$"
360 "$SERVICEACKAUTHOR$"
361 "$SERVICEACKAUTHORALIAS$"
362 "$SERVICEACKAUTHORNAME$"
363 "$SERVICEACKCOMMENT$"
364 "$SERVICEACTIONURL$"
365 "$SERVICEATTEMPT$"
366 "$SERVICECHECKCOMMAND$"
367 "$SERVICECHECKTYPE$"
368 "$SERVICEDESC$"
369 "$SERVICEDISPLAYNAME$"
370 "$SERVICEDOWNTIME$"
371 "$SERVICEDURATION$"
372 "$SERVICEDURATIONSEC$"
373 "$SERVICEEVENTID$"
374 "$SERVICEEXECUTIONTIME$"
375 "$SERVICEGROUPACTIONURL$"
376 "$SERVICEGROUPALIAS$"
377 "$SERVICEGROUPMEMBERS$"
378 "$SERVICEGROUPNAME$"
379 "$SERVICEGROUPNAMES$"
380 "$SERVICEGROUPNOTES$"
381 "$SERVICEGROUPNOTESURL$"
382 "$SERVICEISVOLATILE$"
383 "$SERVICELATENCY$"
384 "$SERVICENOTES$"
385 "$SERVICENOTESURL$"
386 "$SERVICENOTIFICATIONID$"
387 "$SERVICENOTIFICATIONNUMBER$"
388 "$SERVICEOUTPUT$"
389 "$SERVICEPERCENTCHANGE$"
390 "$SERVICEPERFDATA$"
391 "$SERVICEPERFDATAFILE$"
392 "$SERVICEPROBLEMID$"
393 "$SERVICESTATE$"
394 "$SERVICESTATEID$"
395 "$SERVICESTATETYPE$"
396 "$SHORTDATETIME$"
397 "$STATUSDATAFILE$"
398 "$TEMPFILE$"
399 "$TEMPPATH$"
400 "$TIME$"
401 "$TIMET$"
402 "$TOTALHOSTPROBLEMS$"
403 "$TOTALHOSTPROBLEMSUNHANDLED$"
404 "$TOTALHOSTSDOWN$"
405 "$TOTALHOSTSDOWNUNHANDLED$"
406 "$TOTALHOSTSERVICES$"
407 "$TOTALHOSTSERVICESCRITICAL$"
408 "$TOTALHOSTSERVICESOK$"
409 "$TOTALHOSTSERVICESUNKNOWN$"
410 "$TOTALHOSTSERVICESWARNING$"
411 "$TOTALHOSTSUNREACHABLE$"
412 "$TOTALHOSTSUNREACHABLEUNHANDLED$"
413 "$TOTALHOSTSUP$"
414 "$TOTALSERVICEPROBLEMS$"
415 "$TOTALSERVICEPROBLEMSUNHANDLED$"
416 "$TOTALSERVICESCRITICAL$"
417 "$TOTALSERVICESCRITICALUNHANDLED$"
418 "$TOTALSERVICESOK$"
419 "$TOTALSERVICESUNKNOWN$"
420 "$TOTALSERVICESUNKNOWNUNHANDLED$"
421 "$TOTALSERVICESWARNING$"
422 "$TOTALSERVICESWARNINGUNHANDLED$"
423 "$USER1$"
424 "$USER10$"
425 "$USER100$"
426 "$USER101$"
427 "$USER102$"
428 "$USER103$"
429 "$USER104$"
430 "$USER105$"
431 "$USER106$"
432 "$USER107$"
433 "$USER108$"
434 "$USER109$"
435 "$USER11$"
436 "$USER110$"
437 "$USER111$"
438 "$USER112$"
439 "$USER113$"
440 "$USER114$"
441 "$USER115$"
442 "$USER116$"
443 "$USER117$"
444 "$USER118$"
445 "$USER119$"
446 "$USER12$"
447 "$USER120$"
448 "$USER121$"
449 "$USER122$"
450 "$USER123$"
451 "$USER124$"
452 "$USER125$"
453 "$USER126$"
454 "$USER127$"
455 "$USER128$"
456 "$USER129$"
457 "$USER13$"
458 "$USER130$"
459 "$USER131$"
460 "$USER132$"
461 "$USER133$"
462 "$USER134$"
463 "$USER135$"
464 "$USER136$"
465 "$USER137$"
466 "$USER138$"
467 "$USER139$"
468 "$USER14$"
469 "$USER140$"
470 "$USER141$"
471 "$USER142$"
472 "$USER143$"
473 "$USER144$"
474 "$USER145$"
475 "$USER146$"
476 "$USER147$"
477 "$USER148$"
478 "$USER149$"
479 "$USER15$"
480 "$USER150$"
481 "$USER151$"
482 "$USER152$"
483 "$USER153$"
484 "$USER154$"
485 "$USER155$"
486 "$USER156$"
487 "$USER157$"
488 "$USER158$"
489 "$USER159$"
490 "$USER16$"
491 "$USER160$"
492 "$USER161$"
493 "$USER162$"
494 "$USER163$"
495 "$USER164$"
496 "$USER165$"
497 "$USER166$"
498 "$USER167$"
499 "$USER168$"
500 "$USER169$"
501 "$USER17$"
502 "$USER170$"
503 "$USER171$"
504 "$USER172$"
505 "$USER173$"
506 "$USER174$"
507 "$USER175$"
508 "$USER176$"
509 "$USER177$"
510 "$USER178$"
511 "$USER179$"
512 "$USER18$"
513 "$USER180$"
514 "$USER181$"
515 "$USER182$"
516 "$USER183$"
517 "$USER184$"
518 "$USER185$"
519 "$USER186$"
520 "$USER187$"
521 "$USER188$"
522 "$USER189$"
523 "$USER19$"
524 "$USER190$"
525 "$USER191$"
526 "$USER192$"
527 "$USER193$"
528 "$USER194$"
529 "$USER195$"
530 "$USER196$"
531 "$USER197$"
532 "$USER198$"
533 "$USER199$"
534 "$USER2$"
535 "$USER20$"
536 "$USER200$"
537 "$USER201$"
538 "$USER202$"
539 "$USER203$"
540 "$USER204$"
541 "$USER205$"
542 "$USER206$"
543 "$USER207$"
544 "$USER208$"
545 "$USER209$"
546 "$USER21$"
547 "$USER210$"
548 "$USER211$"
549 "$USER212$"
550 "$USER213$"
551 "$USER214$"
552 "$USER215$"
553 "$USER216$"
554 "$USER217$"
555 "$USER218$"
556 "$USER219$"
557 "$USER22$"
558 "$USER220$"
559 "$USER221$"
560 "$USER222$"
561 "$USER223$"
562 "$USER224$"
563 "$USER225$"
564 "$USER226$"
565 "$USER227$"
566 "$USER228$"
567 "$USER229$"
568 "$USER23$"
569 "$USER230$"
570 "$USER231$"
571 "$USER232$"
572 "$USER233$"
573 "$USER234$"
574 "$USER235$"
575 "$USER236$"
576 "$USER237$"
577 "$USER238$"
578 "$USER239$"
579 "$USER24$"
580 "$USER240$"
581 "$USER241$"
582 "$USER242$"
583 "$USER243$"
584 "$USER244$"
585 "$USER245$"
586 "$USER246$"
587 "$USER247$"
588 "$USER248$"
589 "$USER249$"
590 "$USER25$"
591 "$USER250$"
592 "$USER251$"
593 "$USER252$"
594 "$USER253$"
595 "$USER254$"
596 "$USER255$"
597 "$USER256$"
598 "$USER26$"
599 "$USER27$"
600 "$USER28$"
601 "$USER29$"
602 "$USER3$"
603 "$USER30$"
604 "$USER31$"
605 "$USER32$"
606 "$USER33$"
607 "$USER34$"
608 "$USER35$"
609 "$USER36$"
610 "$USER37$"
611 "$USER38$"
612 "$USER39$"
613 "$USER4$"
614 "$USER40$"
615 "$USER41$"
616 "$USER42$"
617 "$USER43$"
618 "$USER44$"
619 "$USER45$"
620 "$USER46$"
621 "$USER47$"
622 "$USER48$"
623 "$USER49$"
624 "$USER5$"
625 "$USER50$"
626 "$USER51$"
627 "$USER52$"
628 "$USER53$"
629 "$USER54$"
630 "$USER55$"
631 "$USER56$"
632 "$USER57$"
633 "$USER58$"
634 "$USER59$"
635 "$USER6$"
636 "$USER60$"
637 "$USER61$"
638 "$USER62$"
639 "$USER63$"
640 "$USER64$"
641 "$USER65$"
642 "$USER66$"
643 "$USER67$"
644 "$USER68$"
645 "$USER69$"
646 "$USER7$"
647 "$USER70$"
648 "$USER71$"
649 "$USER72$"
650 "$USER73$"
651 "$USER74$"
652 "$USER75$"
653 "$USER76$"
654 "$USER77$"
655 "$USER78$"
656 "$USER79$"
657 "$USER8$"
658 "$USER80$"
659 "$USER81$"
660 "$USER82$"
661 "$USER83$"
662 "$USER84$"
663 "$USER85$"
664 "$USER86$"
665 "$USER87$"
666 "$USER88$"
667 "$USER89$"
668 "$USER9$"
669 "$USER90$"
670 "$USER91$"
671 "$USER92$"
672 "$USER93$"
673 "$USER94$"
674 "$USER95$"
675 "$USER96$"
676 "$USER97$"
677 "$USER98$"
678 "$USER99$")))
679 )
680
681
682
683 (defconst nagios-definitions
684 (eval-when-compile
685
686 (concat "^[ \t\r\n]*"
687
688 "\\(" ;; Stick parenthesis around whatever comes out
689 ;; of regexp-opt. We use this to match a
690 ;; subexpression during font-lock.
691 (regexp-opt
692 '("define command"
693 "define contact"
694 "define contactgroup"
695 "define host"
696 "define hostdependency"
697 "define hostescalation"
698 "define hostextinfo"
699 "define hostgroup"
700 "define hostgroupescalation"
701 "define null"
702 "define service"
703 "define servicedependency"
704 "define serviceescalation"
705 "define serviceextinfo"
706 "define servicegroup"
707 "define timeperiod"))
708 ;; This closes the parentheses that we opened
709 "\\)" ;; before regexp-opt.
710
711 ;; These can be "terminated" by either an opening curly
712 ;; brace, or a space.
713 "\\({\\| \\)")
714 )
715 )
716
717
718
719 (defconst nagios-special
720 (eval-when-compile
721 (concat "^[ \t\r\n]*"
722
723 (regexp-opt
724 '("name" "register" "use") t)
725
726 "[ \r\n\t]+"))
727 )
728
729
730
731 ;; The One True Font Locking Variable
732
733 (defvar nagios-font-lock-keywords
734 (list
735 (cons nagios-special font-lock-keyword-face)
736 (cons nagios-directives font-lock-variable-name-face)
737 (cons nagios-macros font-lock-constant-face)
738 (cons nagios-definitions '(1 font-lock-function-name-face)))
739
740 "Rules for highlighting Nagios configuration files."
741 )
742
743
744
745 (defvar nagios-mode-syntax-table nil
746 "Syntax table used in nagios-mode buffers.")
747 (if nagios-mode-syntax-table
748 nil
749 (setq nagios-mode-syntax-table (make-syntax-table))
750 (modify-syntax-entry ?# "< b" nagios-mode-syntax-table) ;; Comment style 1
751 (modify-syntax-entry ?\; "< b" nagios-mode-syntax-table) ;; Comment style 2
752 (modify-syntax-entry ?\n "> b" nagios-mode-syntax-table) ;; End comment
753 )
754
755
756 ;; Main Mode Function
757
758 (defun nagios-mode()
759 "Major mode for editing Nagios configuration files."
760
761 (interactive)
762 (kill-all-local-variables)
763 (make-local-variable 'font-lock-defaults)
764 (make-local-variable 'comment-start)
765 (make-local-variable 'comment-start-skip)
766 (make-local-variable 'comment-end)
767 (make-local-variable 'indent-line-function)
768 (make-local-variable 'syntax-begin-function)
769
770 (set-syntax-table nagios-mode-syntax-table)
771
772 (setq mode-name "nagios"
773 major-mode 'nagios-mode
774 indent-line-function 'nagios-indent-line
775 font-lock-defaults '(nagios-font-lock-keywords)
776 comment-start "#"
777 comment-start-skip "#\|; +"
778 comment-end ""
779
780 ;; Since comments and strings do not span multiple lines,
781 ;; the syntax parser can safely start parsing at the beginning
782 ;; of any line.
783 syntax-begin-function 'beginning-of-line
784 )
785
786 ;; Keyboard Mapping
787 (use-local-map nagios-mode-map)
788
789 ;; I don't /think/ I need to define this before attempting
790 ;; to run it. Users can define it if they want.
791 (run-hooks 'nagios-mode-hook)
792 )
793
794
795 (provide 'nagios-mode)