]> git.eshelyaron.com Git - emacs.git/commitdiff
Always match underscore variables for elixir-ts-mode
authorWilhelm Kirschbaum <wkirschbaum@gmail.com>
Sun, 15 Sep 2024 07:46:07 +0000 (09:46 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 4 Jan 2025 20:22:32 +0000 (21:22 +0100)
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

index d0a692a214bcd31cef88b50b1dc99ee50cd3b7d4..3294a5971f07f77f0fb56ad3e57ac6b10599f73e 100644 (file)
              (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)))