From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: "Ergus via Emacs development discussions." <emacs-devel@gnu.org>,
Yuan Fu <casouri@gmail.com>
Subject: PATCH: csharp-mode - improve fontification of typeof() expressions
Date: Fri, 25 Nov 2022 21:02:48 +0100 [thread overview]
Message-ID: <bc6a8fdb-ce5e-b7bc-3edb-8f46e305dfa3@secure.kjonigsen.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 424 bytes --]
Hey everyone.
As I promised in my earlier mail on this list, I'd still love to keep
contributing.
As such, here's a small patch which improves fontification of C#
typeof() expressions. Is it OK as is, or does anyone see the need for
anything additional to get this merged?
--
Kind regards
*Jostein Kjønigsen*
jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
[-- Attachment #1.2: Type: text/html, Size: 890 bytes --]
[-- Attachment #2: 0001-Csharp-Correctly-fontify-types-in-typeof-expression.patch --]
[-- Type: text/x-patch, Size: 960 bytes --]
From 7280c25f0753ed18a1d74e64b26e80e038e29739 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Fri, 25 Nov 2022 20:15:06 +0100
Subject: [PATCH] Csharp: Correctly fontify types in typeof() expression.
---
lisp/progmodes/csharp-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index af3a4d86da2..11fa951048e 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -806,7 +806,8 @@ csharp-ts-mode--font-lock-settings
(cast_expression (identifier) @font-lock-type-face)
["operator"] @font-lock-type-face
(type_parameter_constraints_clause
- target: (identifier) @font-lock-type-face))
+ target: (identifier) @font-lock-type-face)
+ (type_of_expression (identifier) @font-lock-type-face))
:language 'c-sharp
:feature 'definition
:override t
--
2.37.2
next reply other threads:[~2022-11-25 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 20:02 Jostein Kjønigsen [this message]
2022-11-26 23:11 ` PATCH: csharp-mode - improve fontification of typeof() expressions Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc6a8fdb-ce5e-b7bc-3edb-8f46e305dfa3@secure.kjonigsen.net \
--to=jostein@secure.kjonigsen.net \
--cc=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jostein@kjonigsen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).