From 5800582dc555c369a64fd941f7438fc9c058cc17 Mon Sep 17 00:00:00 2001 From: Wilhelm Kirschbaum Date: Sun, 15 Sep 2024 09:46:07 +0200 Subject: [PATCH] Always match underscore variables for elixir-ts-mode The code comment is invalid, as it is common to treat any _variable as a comment. * lisp/progmodes/elixir-ts-mode.el (elixir-ts-font-lock-settings): Add ":override t" to comment identifier match. (Bug#75156) (cherry picked from commit 43a8f0de5ecbe8430917968af703f4a630567461) --- lisp/progmodes/elixir-ts-mode.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index d0a692a214b..3294a5971f0 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -387,11 +387,9 @@ (binary_operator left: (call target: (identifier) @font-lock-function-name-face)))))) - ;; A function definition like "def _foo" is valid, but we should - ;; not apply the comment-face unless its a non-function identifier, so - ;; the comment matches has to be after the function matches. :language 'elixir :feature 'elixir-comment + :override t '((comment) @font-lock-comment-face ((identifier) @font-lock-comment-face (:match "^_[a-z]\\|^_$" @font-lock-comment-face))) -- 2.39.5