Skip to content

Commit 5f85550

Browse files
committed
Merge pull request #176 from rranelli/fix-#172
Highlight digits in atoms
2 parents 61fc785 + 38cde3a commit 5f85550

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

elixir-mode.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ for the Elixir programming language."
185185
`(
186186
(atoms . ,(rx ":"
187187
(or
188-
(one-or-more (any "a-z" "A-Z" "_" "\"" "'"))
188+
(and
189+
(any "a-z" "A-Z" "_" "\"" "'")
190+
(zero-or-more (any "a-z" "A-Z" "0-9" "_" "\"" "'")))
189191
(and "\"" (one-or-more (not (any "\""))) "\"")
190192
(and "'" (one-or-more (not (any "'"))) "'"))))
191193
(builtin . ,(rx symbol-start

test/elixir-mode-font-test.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,14 @@ end"
124124
:tags '(fontification atom syntax-table)
125125
(elixir-test-with-temp-buffer
126126
":oriole
127-
:andale"
127+
:andale
128+
:ms2pid"
128129
(should (eq (elixir-test-face-at 3) 'elixir-atom-face))
129130
(should (eq (elixir-test-face-at 5) 'elixir-atom-face))
130131
(should (eq (elixir-test-face-at 10) 'elixir-atom-face))
131-
(should (eq (elixir-test-face-at 13) 'elixir-atom-face))))
132+
(should (eq (elixir-test-face-at 13) 'elixir-atom-face))
133+
(should (eq (elixir-test-face-at 18) 'elixir-atom-face))
134+
(should (eq (elixir-test-face-at 23) 'elixir-atom-face))))
132135

133136
(ert-deftest elixir-mode-syntax-table/fontify-map-keys ()
134137
:tags '(fontification map syntax-table)

0 commit comments

Comments
 (0)