From 9f789827b613bf9efcec7e7925b61eb51caa6be1 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 16 Feb 2009 00:20:44 -0500 Subject: [PATCH] Added back font locking for strings. Currently, one of the nested string tests fails. --- nagios-mode.el | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/nagios-mode.el b/nagios-mode.el index 6b1bd3b..7a699b7 100644 --- a/nagios-mode.el +++ b/nagios-mode.el @@ -268,18 +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 '(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." ) -- 2.43.2