]> gitweb.michael.orlitzky.com - nagios-mode.git/blobdiff - nagios-mode.el
Added the first_notification_delay directive.
[nagios-mode.git] / nagios-mode.el
index 6b1bd3beac87315bcb43ce67fdcdb3271af18e5e..f94940ff6e07fcb4ee4f9e3883d3789d293ef86f 100644 (file)
        "dependent_service_description" "email" "event_handler"
        "event_handler_enabled" "execution_failure_criteria"
        "failure_prediction_enabled" "first_notification"
-       "flap_detection_enabled" "freshness_threshold" "friday"
-       "high_flap_threshold" "host_name" "host_notification_commands"
+       "first_notification_delay" "flap_detection_enabled" "freshness_threshold"
+       "friday" "high_flap_threshold" "host_name" "host_notification_commands"
        "host_notification_options" "host_notification_period"
        "host_notifications_enabled" "hostgroup_name" "hostgroups"
        "is_volatile" "last_notification" "low_flap_threshold"
 
 
 
+(defconst nagios-string
+  (eval-when-compile
+    "\\(\".*?\"\\)"))
+
+
 ;; The One True Font Locking Variable
 
 (defvar nagios-font-lock-keywords
   (list
 
+   ;; Font lock the comments first.
+   (cons nagios-comments font-lock-comment-delimiter-face)
+
+   ;; Strings have the highest priority. For now, this is broken,
+   ;; but I guess I would rather have strings miscolored within
+   ;; comments than the other way around.
+   (cons nagios-string '(0 font-lock-string-face t))
+
    (cons nagios-special font-lock-keyword-face)
    (cons nagios-directives font-lock-variable-name-face)
    (cons nagios-macros font-lock-constant-face)
-   (cons nagios-definitions '(1 font-lock-function-name-face))
-
-  ;; And comments take precedence over everything else.
-   (cons nagios-comments '(0 font-lock-comment-delimiter-face t)))
+   (cons nagios-definitions '(1 font-lock-function-name-face)))
 
   "Rules for highlighting Nagios configuration files."
   )