[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 0d35431 228/459: Fix fontification of names
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 0d35431 228/459: Fix fontification of namespaces to match using-statement rules. |
Date: |
Sun, 22 Aug 2021 13:59:33 -0400 (EDT) |
branch: externals/csharp-mode
commit 0d354311bae0ca8e51c4f7b1c8abef90b37f26d6
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Fix fontification of namespaces to match using-statement rules.
---
csharp-mode-tests.el | 6 ++++++
csharp-mode.el | 2 +-
test-files/namespace-fontification.cs | 7 +++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 1e5a954..584da2d 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -123,6 +123,12 @@
"WithNumbers09.Ok" 'font-lock-constant-face
))
+(ert-deftest fontification-of-namespace-statements ()
+ (assess-face-in-file= "./test-files/namespace-fontification.cs"
+ "namespace" 'font-lock-keyword-face
+ "Reference" 'font-lock-constant-face
+ "Under_scored" 'font-lock-constant-face
+ "WithNumbers09.Ok" 'font-lock-constant-face
))
(defun list-repeat-once (mylist)
diff --git a/csharp-mode.el b/csharp-mode.el
index a7dd0b4..215f4f2 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -1110,7 +1110,7 @@ to work properly with code that includes attributes.
;; this needs to be done in the matchers-after because
;; otherwise the namespace names get the font-lock-type-face,
;; due to the energetic efforts of c-forward-type.
- ,`("\\<\\(namespace\\)[
\t\n\r\f\v]+\\(\\(?:[A-Za-z_][[:alnum:]]*\\.\\)*[A-Za-z_][[:alnum:]]*\\)"
+ ,`("\\<\\(namespace\\)[
\t\n\r\f\v]+\\(\\(?:[A-Za-z0-9_]+\\.\\)*[A-Za-z0-9_]+\\)"
2 font-lock-constant-face t)
diff --git a/test-files/namespace-fontification.cs
b/test-files/namespace-fontification.cs
new file mode 100644
index 0000000..9c7e8dd
--- /dev/null
+++ b/test-files/namespace-fontification.cs
@@ -0,0 +1,7 @@
+namespace Reference {
+
+}
+
+namespace Under_Scored {
+
+}
- [elpa] externals/csharp-mode 3c6a4ea 096/459: Add info about customization to readme., (continued)
- [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, 2021/08/22
- [elpa] externals/csharp-mode 0d35431 228/459: Fix fontification of namespaces to match using-statement rules.,
ELPA Syncer <=
- [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
- [elpa] externals/csharp-mode 6af6f88 111/459: Fix fontification tests., ELPA Syncer, 2021/08/22