Skip to content

Commit b8363e9

Browse files
committed
Merge pull request #253 from syohex/highlight-atom
Fix Highlight atom issue(atom contains '!', '?', '@')
2 parents 7f33dc6 + bb8354b commit b8363e9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

elixir-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
(or
128128
(and
129129
(any "a-z" "A-Z" "_" "\"" "'")
130-
(zero-or-more (any "a-z" "A-Z" "0-9" "_" "\"" "'")))
130+
(zero-or-more (any "a-z" "A-Z" "0-9" "_" "\"" "'" "!" "@" "?")))
131131
(and "\"" (one-or-more (not (any "\""))) "\"")
132132
(and "'" (one-or-more (not (any "'"))) "'"))))
133133
(builtin . ,(rx (or line-start (not (any ".")))

test/elixir-mode-font-test.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ true
174174
false
175175
nil
176176
true_false_nil
177+
:insert!
178+
:insert@
179+
:insert?
177180
"
178181
(should (eq (elixir-test-face-at 3) 'elixir-atom-face))
179182
(should (eq (elixir-test-face-at 5) 'elixir-atom-face))
@@ -185,7 +188,10 @@ true_false_nil
185188
(should (eq (elixir-test-face-at 43) 'elixir-atom-face))
186189
(should (eq (elixir-test-face-at 48) 'elixir-atom-face))
187190
(should (eq (elixir-test-face-at 54) 'elixir-atom-face))
188-
(should-not (eq (elixir-test-face-at 57) 'elixir-atom-face))))
191+
(should-not (eq (elixir-test-face-at 57) 'elixir-atom-face))
192+
(should (eq (elixir-test-face-at 74) 'elixir-atom-face))
193+
(should (eq (elixir-test-face-at 82) 'elixir-atom-face))
194+
(should (eq (elixir-test-face-at 97) 'elixir-atom-face))))
189195

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

0 commit comments

Comments
 (0)