From 12b7227185e22923d1e67e3f5a47af97879e2ad2 Mon Sep 17 00:00:00 2001 From: Wilhelm H Kirschbaum Date: Sat, 7 Oct 2023 10:37:49 +0200 Subject: [PATCH] Simplify sigil font-lock match for elixir-ts-mode There is no need to match on specific sigils, except for regex. * lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings): Update sigil match. --- lisp/progmodes/elixir-ts-mode.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index 2ddce3de105..de078454463 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -466,23 +466,19 @@ elixir-ts--font-lock-settings :language 'elixir :feature 'elixir-sigil - :override t `((sigil - (sigil_name) @elixir-ts-font-sigil-name-face - (:match "^[sSwWpPUD]$" @elixir-ts-font-sigil-name-face)) - @font-lock-string-face + (sigil_name) @font-lock-regexp-face + (:match "^[rR]$" @font-lock-regexp-face)) + @font-lock-regexp-face (sigil - "~" @font-lock-string-face (sigil_name) @elixir-ts-font-sigil-name-face - (:match "^[rR]$" @elixir-ts-font-sigil-name-face)) - @font-lock-regexp-face + (:match "^[^HF]$" @elixir-ts-font-sigil-name-face)) + @elixir-ts-font-sigil-name-face (sigil "~" @font-lock-string-face (sigil_name) @elixir-ts-font-sigil-name-face quoted_start: _ @font-lock-string-face - quoted_end: _ @font-lock-string-face - (:match "^[HF]$" @elixir-ts-font-sigil-name-face))) - + quoted_end: _ @font-lock-string-face)) :language 'elixir :feature 'elixir-string-escape :override t -- 2.42.0