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)
This commit is contained in:
Wilhelm Kirschbaum 2024-09-15 09:46:07 +02:00 committed by Stefan Kangas
parent 2ba6387d1d
commit 43a8f0de5e

View file

@ -402,11 +402,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)))