"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)
)
)
(read-kbd-macro "}")
'nagios-insert-right-brace-and-indent)
)
-
+
(defconst nagios-directives
"$HOSTACTIONURL$"
"$HOSTADDRESS$"
"$HOSTALIAS$"
+ "$HOSTANDSERVICESIMPORTANCE$"
"$HOSTATTEMPT$"
"$HOSTCHECKCOMMAND$"
"$HOSTCHECKTYPE$"
"$HOSTEXECUTIONTIME$"
"$HOSTGROUPACTIONURL$"
"$HOSTGROUPALIAS$"
+ "$HOSTGROUPMEMBERADDRESSES$"
"$HOSTGROUPMEMBERS$"
"$HOSTGROUPNAME$"
"$HOSTGROUPNAMES$"
"$HOSTGROUPNOTES$"
"$HOSTGROUPNOTESURL$"
+ "$HOSTIMPORTANCE$"
+ "$HOSTINFOURL$"
"$HOSTLATENCY$"
"$HOSTNAME$"
"$HOSTNOTES$"
"$HOSTNOTESURL$"
+ "$HOSTNOTIFICATIONENABLED$"
"$HOSTNOTIFICATIONID$"
"$HOSTNOTIFICATIONNUMBER$"
+ "$HOSTNOTIFICATIONPERIOD$"
"$HOSTOUTPUT$"
"$HOSTPERCENTCHANGE$"
"$HOSTPERFDATA$"
"$SERVICEGROUPNAMES$"
"$SERVICEGROUPNOTES$"
"$SERVICEGROUPNOTESURL$"
+ "$SERVICEIMPORTANCE$"
+ "$SERVICEINFOURL$"
"$SERVICEISVOLATILE$"
"$SERVICELATENCY$"
"$SERVICENOTES$"
"$SERVICENOTESURL$"
+ "$SERVICENOTIFICATIONENABLED$"
"$SERVICENOTIFICATIONID$"
"$SERVICENOTIFICATIONNUMBER$"
+ "$SERVICENOTIFICATIONPERIOD$"
"$SERVICEOUTPUT$"
"$SERVICEPERCENTCHANGE$"
"$SERVICEPERFDATA$"
"define hostescalation"
"define hostextinfo"
"define hostgroup"
- "define hostgroupescalation"
"define null"
"define service"
"define servicedependency"
(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
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.