ini-mode.el: fix key highlighting

This commit is contained in:
Jeremy Baxter 2024-07-23 10:07:57 +12:00
parent d1533e0048
commit 79c7ccf762

View file

@ -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'.")