branch: externals/csharp-mode commit 48851778e0f01a2b0395e054e418a1d8a1687a06 Merge: 31124db f640019 Author: Jostein Kjønigsen <jost...@kjonigsen.net> Commit: GitHub <nore...@github.com>
Merge pull request #161 from ryuslash/fix-package-fontification Fix display of ‘package’ as any sort of name --- csharp-mode-tests.el | 12 ++++++++++++ csharp-mode.el | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el index 85b2618..6e5ac24 100644 --- a/csharp-mode-tests.el +++ b/csharp-mode-tests.el @@ -67,6 +67,18 @@ "value" 'font-lock-constant-face )) +(ert-deftest fontification-of-package () + (require 'assess) + (assess-face-in-text= + "var package = true;" + "package" 'font-lock-variable-name-face)) + +(ert-deftest fontification-of-import () + (require 'assess) + (assess-face-in-text= + "var import = true;" + "import" 'font-lock-variable-name-face)) + (ert-deftest fontification-of-literals-allows-multi-line-strings () (require 'assess) (should (assess-face-at= diff --git a/csharp-mode.el b/csharp-mode.el index 0fea1d1..7793072 100644 --- a/csharp-mode.el +++ b/csharp-mode.el @@ -1399,6 +1399,12 @@ This regexp is assumed to not match any non-operator identifier." (c-lang-defconst c-other-block-decl-kwds csharp '("namespace")) +(c-lang-defconst c-ref-list-kwds + csharp nil) + +(c-lang-defconst c-other-decl-kwds + csharp nil) + (c-lang-defconst c-other-kwds csharp '("sizeof" "typeof" "is" "as" "yield" "where" "select" "in" "from" "let" "orderby" "ascending" "descending"