From 79c7ccf762c24de9964649c547898b3ace1757cc Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Tue, 23 Jul 2024 10:07:57 +1200 Subject: [PATCH] ini-mode.el: fix key highlighting --- ini-mode.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ini-mode.el b/ini-mode.el index c5a70b9..b5a12d1 100644 --- a/ini-mode.el +++ b/ini-mode.el @@ -27,16 +27,14 @@ ;; ini-mode.el provides `ini-mode', an implementation of a simple ;; font-locking major mode for INI. -;; TODO: fix section keys refusing to highlight initially - ;;; Code: (require 'font-lock) (defvar ini-mode-font-lock-keywords '(("\\([#;].*$\\)" . font-lock-comment-face) - ("[ \t]*\\[\\(.+\\)\\]" . 'font-lock-type-face) - ("\\(^[^=]+\\)" . 'font-lock-keyword-face) + ("\\[\\(.+\\)\\]" 1 'font-lock-type-face) + ("\\(^.+\\)=" 1 'font-lock-variable-name-face) ("=\\(.+$\\)" 1 'font-lock-string-face)) "Keywords for font locking in `ini-mode'.")