[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 8d43a70 229/459: Fix fontification of using
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 8d43a70 229/459: Fix fontification of using-statements. |
Date: |
Sun, 22 Aug 2021 13:59:33 -0400 (EDT) |
branch: externals/csharp-mode
commit 8d43a704b5d53425eeccf42924cf0d4f43892607
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Fix fontification of using-statements.
This closes https://github.com/josteink/csharp-mode/issues/100.
---
csharp-mode-tests.el | 7 +++++++
csharp-mode.el | 4 ++--
test-files/using-fontification.cs | 2 ++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 1549b3f..da6a0e4 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -115,6 +115,13 @@
;; "GenericMethod2" 'font-lock-function-name-face
))
+(ert-deftest fontification-of-using-statements ()
+ (assess-face-in-file= "./test-files/using-fontification.cs"
+ "using" 'font-lock-keyword-face
+ "Reference" 'font-lock-constant-face
+ "Under_scored" 'font-lock-constant-face
+ ))
+
(defun list-repeat-once (mylist)
(append mylist mylist))
diff --git a/csharp-mode.el b/csharp-mode.el
index 349c84e..dca1624 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -762,11 +762,11 @@ to work properly with code that includes attributes."
,`(,(concat
"\\<\\(using\\)[ \t\n\f\v\r]+"
"\\(?:"
- "\\([A-Za-z_][[:alnum:]]*\\)"
+ "\\([A-Za-z_]+\\)"
"[ \t\n\f\v\r]*="
"[ \t\n\f\v\r]*"
"\\)?"
- "\\(\\(?:[A-Za-z_][[:alnum:]]*\\.\\)*[A-Za-z_][[:alnum:]]*\\)"
+ "\\(\\(?:[A-Za-z_]+\\.\\)*[A-Za-z_]+\\)"
"[ \t\n\f\v\r]*;")
(2 font-lock-constant-face t t)
(3 font-lock-constant-face))
diff --git a/test-files/using-fontification.cs
b/test-files/using-fontification.cs
new file mode 100644
index 0000000..3c3b121
--- /dev/null
+++ b/test-files/using-fontification.cs
@@ -0,0 +1,2 @@
+using Reference;
+using Under_scored;
- [elpa] externals/csharp-mode 5f127e2 455/459: Add small notice about elpa in readme, (continued)
- [elpa] externals/csharp-mode 5f127e2 455/459: Add small notice about elpa in readme, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2595b90 449/459: Revert "Tweak mode to not require tree-sitter packages", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 166a5fb 340/459: Revert "Handle "nameof" entirely in c-basic-matchers-after.", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1e7bf8a 358/459: Update build.yml, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a685c7f 359/459: Update build.yml, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e2541a4 362/459: Update README.org, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c1489db 370/459: First small tree-sitter query, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2bf76fd 378/459: Fix csharp-mode initialization without forked tree-sitter, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7e7353a 133/459: Imenu fixes: methods with comments, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1de5644 227/459: using: Don't mess up alnums in indentifier-fontification., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8d43a70 229/459: Fix fontification of using-statements.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 4da4c39 231/459: Fix fontification of namespaces to match using-statement rules., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5e47b77 260/459: Fix error handling multiline compiler-directives., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 20efdc8 262/459: Add support for highlighting function-invocation., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d365498 307/459: Merge pull request #170 from josteink/compiler-fontifications, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 72c1912 314/459: Name change of codedoc functions, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ecc3f38 317/459: Add annotation-top-cont as a new syntax construct, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 51ab628 319/459: Update README.org, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode be5af57 322/459: Fix optional type suffix regex, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 217d3a7 324/459: Revert "Add nullable operator to concatenated identifiers", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 97903a2 327/459: Merge pull request #179 from josteink/feature/compilation-mode-dotnetcore, ELPA Syncer, 2021/08/22