From 226cf355714c221934a8013ce5453edbdae52005 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Tue, 23 Jul 2024 10:29:08 +1200 Subject: [PATCH] ini-mode.el: add reference font-locking Highlight ${var}, {var} and %var% constructs. --- ini-mode.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ini-mode.el b/ini-mode.el index b5a12d1..e9b3997 100644 --- a/ini-mode.el +++ b/ini-mode.el @@ -35,7 +35,15 @@ '(("\\([#;].*$\\)" . font-lock-comment-face) ("\\[\\(.+\\)\\]" 1 'font-lock-type-face) ("\\(^.+\\)=" 1 'font-lock-variable-name-face) - ("=\\(.+$\\)" 1 'font-lock-string-face)) + ("=\\(.+$\\)" 1 'font-lock-string-face) + ("\\(\\$?{\\)\\(.+\\)\\(}\\)" + (1 'font-lock-bracket-face t) + (2 'font-lock-variable-use-face t) + (3 'font-lock-bracket-face t)) + ("\\(%\\)\\(.+\\)\\(%\\)" + (1 'font-lock-bracket-face t) + (2 'font-lock-variable-use-face t) + (3 'font-lock-bracket-face t))) "Keywords for font locking in `ini-mode'.") (define-derived-mode ini-mode nil "INI"