X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=nagios-mode.el;h=7c9f663c0fa5a5b8b1fe039b3a84b1386c0833bc;hb=b7394981592e89a8303b2d3cac7eae43f5fc61d2;hp=f8ea84270a3bb56893e728610e5d44deabaf784b;hpb=66ba71c7c53aa29c21edbbbb2dde9a7abde6f4ea;p=nagios-mode.git diff --git a/nagios-mode.el b/nagios-mode.el index f8ea842..7c9f663 100644 --- a/nagios-mode.el +++ b/nagios-mode.el @@ -190,13 +190,13 @@ (regexp-opt '("active_checks_enabled" "address" "alias" "check_command" "check_freshness" "check_interval" "check_period" "checks_enabled" - "command_line" "command_name" "contact_groups" "contact_name" - "contactgroup_name" "contacts" "dependent_host_name" - "dependent_service_description" "email" "event_handler" - "event_handler_enabled" "execution_failure_criteria" + "command_line" "command_name" "contactgroups" "contact_groups" + "contactgroup_members" "contact_name" "contactgroup_name" "contacts" + "dependent_host_name" "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" @@ -268,25 +268,28 @@ +(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 font-lock-function-name-face) - - ;; We have to (override) un-color the curly braces here because it's - ;; possible for them to become colored along with a definition - ;; if there is no space between the definition and the open - ;; brace. This has to come after the nagios-definitions, otherwise - ;; the font-locking will miss the definitions that end with a brace. - (cons "[{}]" '(0 nil t)) - - ;; 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." )