Skip to content

Commit e11c403

Browse files
committed
Merge pull request #268 from gausby/add-font-lock-to-defoverridable
added font-lock to defoverridable
2 parents 0a9fd07 + ce94977 commit e11c403

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

elixir-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
(or "def" "defp" "defmodule" "defprotocol"
143143
"defmacro" "defmacrop" "defdelegate"
144144
"defexception" "defstruct" "defimpl"
145-
"defcallback")
145+
"defcallback" "defoverridable")
146146
symbol-end))
147147
(builtin-namespace . ,(rx (or line-start (not (any ".")))
148148
symbol-start

test/elixir-mode-font-test.el

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,19 @@ end"
139139
(should (eq (elixir-test-face-at 5) 'font-lock-function-name-face))
140140
(should (eq (elixir-test-face-at 8) 'font-lock-function-name-face))))
141141

142+
(ert-deftest elixir-mode-syntax-table/fontify-defoverridable/1 ()
143+
:tags '(fontification syntax-table)
144+
(elixir-test-with-temp-buffer
145+
"defmodule Foo do
146+
defmacro __using__(_opts) do
147+
quote do
148+
def bar, do: :ok
149+
defoverridable [bar: 0]
150+
end
151+
end
152+
end"
153+
(should (eq (elixir-test-face-at 91) 'font-lock-keyword-face))))
154+
142155
(ert-deftest elixir-mode-syntax-table/fontify-heredoc/1 ()
143156
:tags '(fontification heredoc syntax-table)
144157
(elixir-test-with-temp-buffer

0 commit comments

Comments
 (0)