[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 643c63e 268/459: Highlight "value" as a con
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 643c63e 268/459: Highlight "value" as a constant. |
Date: |
Sun, 22 Aug 2021 13:59:41 -0400 (EDT) |
branch: externals/csharp-mode
commit 643c63ee11bf0bbaf37204251edb5f441c269d10
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Highlight "value" as a constant.
Test-cases.
This closes https://github.com/josteink/csharp-mode/issues/141.
---
csharp-mode-tests.el | 11 +++++++++++
csharp-mode.el | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index d166a3f..8440ad0 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -54,6 +54,17 @@
"true" 'font-lock-constant-face
))
+(ert-deftest fontification-of-constants ()
+ (require 'assess)
+ (assess-face-in-text=
+ "testBool1 = true;\ntestBool2 = false;\ntestObj = null;\ntestProp = value;"
+ ;; should not be interpreted as string because of trailing \!
+ "false" 'font-lock-constant-face
+ "true" 'font-lock-constant-face
+ "null" 'font-lock-constant-face
+ "value" 'font-lock-constant-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 e6d411d..111a87f 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -1384,7 +1384,7 @@ This regexp is assumed to not match any non-operator
identifier."
;; Constant keywords
(c-lang-defconst c-constant-kwds
- csharp '("true" "false" "null"))
+ csharp '("true" "false" "null" "value"))
;; Keywords that start "primary expressions."
(c-lang-defconst c-primary-expr-kwds
- [elpa] externals/csharp-mode bd54e4d 250/459: Add csharp group definition, (continued)
- [elpa] externals/csharp-mode bd54e4d 250/459: Add csharp group definition, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 331b45d 251/459: Try fix/update CI-settings, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 85ae15d 252/459: Hacky formatting trick to make codedoc work with Omnisharp defaults, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 461cd87 254/459: Fix compilation error on Emacs 26., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ba7a81a 253/459: Advise c-inside-bracelist-p (#122), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5bfd3d2 257/459: Fix fontification of namespaces in using-statements., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 561c359 258/459: Fix fontification in Emacs27., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c66916e 259/459: Update version/meta-data., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 239527c 263/459: Protect dmode from ccmode monkeypatch (#134), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f3aff25 261/459: Try to properly silence warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 643c63e 268/459: Highlight "value" as a constant.,
ELPA Syncer <=
- [elpa] externals/csharp-mode fcd092d 266/459: Add Emacs 26 to CI., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2381280 269/459: Remove excess (incorrect) comment., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 30ae136 277/459: Merge pull request #150 from josteink/josteink-CI-fix, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 57bd21b 279/459: Merge pull request #152 from DamienCassou/typos, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 31124db 281/459: Merge pull request #156 from krzsztf/fix-lambda-indentation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ff4111e 278/459: Fix typos, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9c596c9 283/459: Advice to override only in csharp-mode, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 617dd6d 284/459: Ensure ad-do-it is called on else branch, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3d02042 291/459: makefile: Make repeated test-runs faster to run., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 072c3dc 292/459: Fix parts of `fontification-of-literals-detects-end-of-strings`, ELPA Syncer, 2021/08/22