X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=sidebyside;f=nagios-mode.el;h=882933f0c33d162779694a829947079709afaf66;hb=13a9ddce3994dda86585ff9435a7cbdf89f7be5f;hp=7ee729f50a46c008311939ac84008f410eefaac4;hpb=5ca4310294df8393175b1a8f1f12aec14bb31b8a;p=nagios-mode.git diff --git a/nagios-mode.el b/nagios-mode.el index 7ee729f..882933f 100644 --- a/nagios-mode.el +++ b/nagios-mode.el @@ -119,7 +119,7 @@ "True if the character at position pos is commented, nil otherwise." (save-excursion (goto-char pos) - (re-search-backward "#" (nagios-beginning-of-line-pos) t) + (re-search-backward "\\(#\\|;\\)" (nagios-beginning-of-line-pos) t) ) ) @@ -234,7 +234,7 @@ (read-kbd-macro "}") 'nagios-insert-right-brace-and-indent) ) - + (defconst nagios-directives @@ -329,6 +329,7 @@ "$HOSTACTIONURL$" "$HOSTADDRESS$" "$HOSTALIAS$" + "$HOSTANDSERVICESIMPORTANCE$" "$HOSTATTEMPT$" "$HOSTCHECKCOMMAND$" "$HOSTCHECKTYPE$" @@ -340,17 +341,22 @@ "$HOSTEXECUTIONTIME$" "$HOSTGROUPACTIONURL$" "$HOSTGROUPALIAS$" + "$HOSTGROUPMEMBERADDRESSES$" "$HOSTGROUPMEMBERS$" "$HOSTGROUPNAME$" "$HOSTGROUPNAMES$" "$HOSTGROUPNOTES$" "$HOSTGROUPNOTESURL$" + "$HOSTIMPORTANCE$" + "$HOSTINFOURL$" "$HOSTLATENCY$" "$HOSTNAME$" "$HOSTNOTES$" "$HOSTNOTESURL$" + "$HOSTNOTIFICATIONENABLED$" "$HOSTNOTIFICATIONID$" "$HOSTNOTIFICATIONNUMBER$" + "$HOSTNOTIFICATIONPERIOD$" "$HOSTOUTPUT$" "$HOSTPERCENTCHANGE$" "$HOSTPERFDATA$" @@ -421,12 +427,16 @@ "$SERVICEGROUPNAMES$" "$SERVICEGROUPNOTES$" "$SERVICEGROUPNOTESURL$" + "$SERVICEIMPORTANCE$" + "$SERVICEINFOURL$" "$SERVICEISVOLATILE$" "$SERVICELATENCY$" "$SERVICENOTES$" "$SERVICENOTESURL$" + "$SERVICENOTIFICATIONENABLED$" "$SERVICENOTIFICATIONID$" "$SERVICENOTIFICATIONNUMBER$" + "$SERVICENOTIFICATIONPERIOD$" "$SERVICEOUTPUT$" "$SERVICEPERCENTCHANGE$" "$SERVICEPERFDATA$" @@ -739,7 +749,6 @@ "define hostescalation" "define hostextinfo" "define hostgroup" - "define hostgroupescalation" "define null" "define service" "define servicedependency" @@ -810,7 +819,7 @@ (make-local-variable 'syntax-begin-function) (set-syntax-table nagios-mode-syntax-table) - + (setq mode-name "nagios" major-mode 'nagios-mode indent-line-function 'nagios-indent-line @@ -818,7 +827,7 @@ comment-start "#" comment-start-skip "#\|; +" comment-end "" - + ;; Since comments and strings do not span multiple lines, ;; the syntax parser can safely start parsing at the beginning ;; of any line.