From 8dcfb9a622557c139ec918282aaf5c411eb9c639 Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Thu, 10 Sep 2015 21:56:28 +0900 Subject: [PATCH 1/2] Add highlighting atom tests(#251) --- test/elixir-mode-font-test.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/elixir-mode-font-test.el b/test/elixir-mode-font-test.el index fe254570..b10d1557 100644 --- a/test/elixir-mode-font-test.el +++ b/test/elixir-mode-font-test.el @@ -174,6 +174,9 @@ true false nil true_false_nil +:insert! +:insert@ +:insert? " (should (eq (elixir-test-face-at 3) 'elixir-atom-face)) (should (eq (elixir-test-face-at 5) 'elixir-atom-face)) @@ -185,7 +188,10 @@ true_false_nil (should (eq (elixir-test-face-at 43) 'elixir-atom-face)) (should (eq (elixir-test-face-at 48) 'elixir-atom-face)) (should (eq (elixir-test-face-at 54) 'elixir-atom-face)) - (should-not (eq (elixir-test-face-at 57) 'elixir-atom-face)))) + (should-not (eq (elixir-test-face-at 57) 'elixir-atom-face)) + (should (eq (elixir-test-face-at 74) 'elixir-atom-face)) + (should (eq (elixir-test-face-at 82) 'elixir-atom-face)) + (should (eq (elixir-test-face-at 97) 'elixir-atom-face)))) (ert-deftest elixir-mode-syntax-table/fontify-map-keys () :tags '(fontification map syntax-table) From bb8354b0de37331bf792173696d560185b91b63f Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Thu, 10 Sep 2015 21:56:57 +0900 Subject: [PATCH 2/2] Fix highlighting atom which contains '@', '!', '?' --- elixir-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elixir-mode.el b/elixir-mode.el index ddd482c1..fd027a74 100644 --- a/elixir-mode.el +++ b/elixir-mode.el @@ -127,7 +127,7 @@ (or (and (any "a-z" "A-Z" "_" "\"" "'") - (zero-or-more (any "a-z" "A-Z" "0-9" "_" "\"" "'"))) + (zero-or-more (any "a-z" "A-Z" "0-9" "_" "\"" "'" "!" "@" "?"))) (and "\"" (one-or-more (not (any "\""))) "\"") (and "'" (one-or-more (not (any "'"))) "'")))) (builtin . ,(rx (or line-start (not (any ".")))