[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 0cd0b2c 226/459: Fix fontification of using
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 0cd0b2c 226/459: Fix fontification of using-statements. |
Date: |
Sun, 22 Aug 2021 13:59:32 -0400 (EDT) |
branch: externals/csharp-mode
commit 0cd0b2c5579525c0d48c4b9dbe6c55b34e19327b
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 1d97d16..8c5d0ab 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 55fe188 101/459: Use `define-derived-mode`, (continued)
- [elpa] externals/csharp-mode 55fe188 101/459: Use `define-derived-mode`, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c6a4ea 096/459: Add info about customization to readme., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f80eace 098/459: Revert "Fix runtime warnings about obsolete Emacs-functions.", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 43e7120 095/459: Merge remote-tracking branch 'less-colors', ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e22eb34 210/459: imenu: support nested generic return-types., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1d2ef53 212/459: Fix imenu-indexing of members with underscore in name., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 33fb05c 213/459: imenu: Fix indexing of fields with _ in name., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 14bc3c6 215/459: Fix broken syntax-propertize., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2275dda 218/459: Properly document workaround for syntax-properties, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0183fc4 221/459: Prepare changelog for future bugs :), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0cd0b2c 226/459: Fix fontification of using-statements.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 0d35431 228/459: Fix fontification of namespaces to match using-statement rules., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c989a8 230/459: using: Don't mess up alnums in indentifier-fontification., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5787aef 233/459: Update changelog., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 14e0327 235/459: Bump version and updated-date., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5ca1702 236/459: Make csharp-mode-map inherit from prog-mode-map, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0f65654 245/459: Add regression test, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 628a4e2 248/459: Added testcases for region fontification., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 79e0a60 256/459: New simpler build based on Cask, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode bf613f8 274/459: Handle failure correctly, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5d0ffaa 113/459: Use cl-lib equivalents for incf and decf, ELPA Syncer, 2021/08/22