Skip to content

Commit 035d4a9

Browse files
committed
Fix bug in highlighting func names w/ underscores.
1 parent ab09ca1 commit 035d4a9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

elixir-mode.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@
243243
(or "true" "false" "nil")
244244
symbol-end))
245245
(builtins . ,(rx symbol-start
246-
(or "Erlang" "__MODULE__" "__LINE__" "__FILE__"
247-
"__ENV__" "__DIR__")
248-
symbol-end))
246+
(or "_" "Erlang" "__MODULE__" "__LINE__" "__FILE__"
247+
"__ENV__" "__DIR__")
248+
symbol-end))
249249
(sigils . ,(rx "~" (or "B" "C" "R" "S" "b" "c" "r" "s" "w")))
250250
(method-defines . ,(rx symbol-start
251251
(or "def" "defdelegate" "defmacro" "defmacrop"
@@ -289,7 +289,7 @@
289289
symbol-end))
290290
(identifiers . ,(rx symbol-start
291291
(one-or-more (any "A-Z" "a-z""_"))
292-
(zero-or-more (any "0-9"))
292+
(zero-or-more (any "0-9" "_"))
293293
(optional (or "?" "!"))
294294
symbol-end))
295295
(atoms . ,(rx ":"

elixir-smie.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
;; Note that ?_ might be better as class "_", but either seems to
1717
;; work:
18-
(modify-syntax-entry ?_ "w" table)
18+
(modify-syntax-entry ?_ "_" table)
1919
(modify-syntax-entry ?? "w" table)
2020
(modify-syntax-entry ?~ "w" table)
2121
(modify-syntax-entry ?! "_" table)

0 commit comments

Comments
 (0)