Skip to content

Commit 1e85220

Browse files
committed
& char should also be colored as part of the module
1 parent b4a2140 commit 1e85220

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

elixir-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
;; Finally, like other identifiers, it can be terminated with either `?'
176176
;; or `!'.
177177
(module-names . ,(rx symbol-start
178-
(optional "%")
178+
(optional (or "%" "&"))
179179
(one-or-more (any "A-Z"))
180180
(zero-or-more (any "A-Z" "a-z" "_" "0-9"))
181181
(zero-or-more

test/elixir-mode-font-test.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ match=~r/foo/"
4949
"defmodule Application.Behavior do
5050
use Application.Behaviour
5151
Stand.Alone.call
52-
%RuntimeError{message: msg}"
52+
%RuntimeError{message: msg}
53+
&Enum"
5354
(should (eq (elixir-test-face-at 1) 'font-lock-keyword-face))
5455
(should (eq (elixir-test-face-at 11) 'font-lock-type-face))
5556
(should (eq (elixir-test-face-at 22) 'font-lock-type-face))
@@ -61,6 +62,8 @@ match=~r/foo/"
6162
(should (eq (elixir-test-face-at 53) 'font-lock-type-face))
6263
(should (eq (elixir-test-face-at 68) 'font-lock-type-face))
6364
(should (eq (elixir-test-face-at 72) 'font-lock-type-face))
65+
(should (eq (elixir-test-face-at 114) 'font-lock-type-face))
66+
(should (eq (elixir-test-face-at 117) 'font-lock-type-face))
6467
;; no face for function call
6568
(should (eq (elixir-test-face-at 79) nil))
6669
(should (eq (elixir-test-face-at 84) 'font-lock-type-face))

0 commit comments

Comments
 (0)