diff --git a/elixir-mode.el b/elixir-mode.el index f046d542..08907960 100644 --- a/elixir-mode.el +++ b/elixir-mode.el @@ -235,6 +235,7 @@ for the Elixir programming language." ;; Finally, like other identifiers, it can be terminated with either `?' ;; or `!'. (module-names . ,(rx symbol-start + (optional "%") (one-or-more (any "A-Z")) (zero-or-more (any "A-Z" "a-z" "_" "0-9")) (zero-or-more diff --git a/test/elixir-mode-font-test.el b/test/elixir-mode-font-test.el index b8f248ed..0b86cae6 100644 --- a/test/elixir-mode-font-test.el +++ b/test/elixir-mode-font-test.el @@ -44,7 +44,8 @@ buffer." (elixir-test-with-temp-buffer "defmodule Application.Behavior do use Application.Behaviour - Stand.Alone.call" + Stand.Alone.call + %RuntimeError{message: msg}" (should (eq (elixir-test-face-at 1) 'font-lock-keyword-face)) (should (eq (elixir-test-face-at 11) 'font-lock-type-face)) (should (eq (elixir-test-face-at 22) 'font-lock-type-face)) @@ -57,7 +58,10 @@ buffer." (should (eq (elixir-test-face-at 68) 'font-lock-type-face)) (should (eq (elixir-test-face-at 72) 'font-lock-type-face)) ;; no face for function call - (should (eq (elixir-test-face-at 79) nil)))) + (should (eq (elixir-test-face-at 79) nil)) + (should (eq (elixir-test-face-at 84) 'font-lock-type-face)) + ;; no face for curly braces + (should (eq (elixir-test-face-at 97) nil)))) (ert-deftest elixir-mode-syntax-table/fontify-regex-with-quote () "https://github.com/elixir-lang/emacs-elixir/issues/23"