unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59657: (29.0.50; lisp/progrmodes/csharp-mode.el: fontification of common constructs missing)
       [not found] <handler.59657.B.16696381765634.ack@debbugs.gnu.org>
@ 2022-11-28 12:38 ` Jostein Kjønigsen
  2022-11-28 23:10   ` Yuan Fu
  0 siblings, 1 reply; 2+ messages in thread
From: Jostein Kjønigsen @ 2022-11-28 12:38 UTC (permalink / raw)
  To: 59657, Yuan Fu, Theodor Thornhill


[-- Attachment #1.1: Type: text/plain, Size: 1236 bytes --]

Attached are a few patches for the issues found so far.


Kind Regards.
*Jostein Kjønigsen*

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>


-------- Forwarded Message --------
Subject: 	bug#59657: Acknowledgement (29.0.50; 
lisp/progrmodes/csharp-mode.el: fontification of common constructs missing)
Date: 	Mon, 28 Nov 2022 12:23:01 +0000
From: 	GNU bug Tracking System <help-debbugs@gnu.org>
Reply-To: 	59657@debbugs.gnu.org
To: 	jostein@kjonigsen.net



Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
bug-gnu-emacs@gnu.org

If you wish to submit further information on this problem, please
send it to 59657@debbugs.gnu.org.

Please do not send mail to help-debbugs@gnu.org unless you wish
to report a problem with the Bug-tracking system.

-- 
59657:https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59657
GNU Bug Tracking System
Contacthelp-debbugs@gnu.org  with problems

[-- Attachment #1.2: Type: text/html, Size: 3414 bytes --]

[-- Attachment #2: 0001-lisp-progmodes-csharp-mode.el-Better-fontification-f.patch --]
[-- Type: text/x-patch, Size: 1132 bytes --]

From 0cd8453b34c176feada25fcf01ece5fbd0453c01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Mon, 28 Nov 2022 13:06:03 +0100
Subject: [PATCH 1/3] lisp/progmodes/csharp-mode.el: Better fontification for
 variables

---
 lisp/progmodes/csharp-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index 6712fcc57e2..006b3fba26e 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -793,7 +793,10 @@ csharp-ts-mode--font-lock-settings
      (variable_declarator (identifier) @font-lock-variable-name-face)
 
      (parameter type: (identifier) @font-lock-type-face)
-     (parameter name: (identifier) @font-lock-variable-name-face))
+     (parameter name: (identifier) @font-lock-variable-name-face)
+
+     (binary_expression (identifier) @font-lock-variable-name-face)
+     (argument (identifier) @font-lock-variable-name-face))
    :language 'c-sharp
    :feature 'expression
    '((conditional_expression (identifier) @font-lock-variable-name-face)
-- 
2.37.2


[-- Attachment #3: 0002-lisp-progmodes-csharp-mode.el-fontify-type-names-in-.patch --]
[-- Type: text/x-patch, Size: 1001 bytes --]

From 9e5f238b532ee377259dbd3f25f2ec9ced6929f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Mon, 28 Nov 2022 13:09:58 +0100
Subject: [PATCH 2/3] lisp/progmodes/csharp-mode.el: fontify type-names in
 new-expressions.

---
 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 006b3fba26e..48da6035dc7 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -743,7 +743,8 @@ csharp-ts-mode--font-lock-settings
      ["operator"] @font-lock-type-face
      (type_parameter_constraints_clause
       target: (identifier) @font-lock-type-face)
-     (type_of_expression (identifier) @font-lock-type-face))
+     (type_of_expression (identifier) @font-lock-type-face)
+     (object_creation_expression (identifier) @font-lock-type-face))
    :language 'c-sharp
    :feature 'definition
    :override t
-- 
2.37.2


[-- Attachment #4: 0003-lisp-progmodes-csharp-mode.el-Improve-fontification-.patch --]
[-- Type: text/x-patch, Size: 1043 bytes --]

From ed93f2feed488268cbdeaf017c66aca39915759f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Mon, 28 Nov 2022 13:16:25 +0100
Subject: [PATCH 3/3] lisp/progmodes/csharp-mode.el: Improve fontification for
 catch-statements.

---
 lisp/progmodes/csharp-mode.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index 48da6035dc7..3da3079f089 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -790,6 +790,12 @@ csharp-ts-mode--font-lock-settings
      (invocation_expression
       (member_access_expression (identifier) @font-lock-function-name-face))
 
+     (catch_declaration
+      ((identifier) @font-lock-type-face))
+     (catch_declaration
+      ((identifier) @font-lock-type-face
+       (identifier) @font-lock-variable-name-face))
+
      (variable_declaration (identifier) @font-lock-type-face)
      (variable_declarator (identifier) @font-lock-variable-name-face)
 
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#59657: (29.0.50; lisp/progrmodes/csharp-mode.el: fontification of common constructs missing)
  2022-11-28 12:38 ` bug#59657: (29.0.50; lisp/progrmodes/csharp-mode.el: fontification of common constructs missing) Jostein Kjønigsen
@ 2022-11-28 23:10   ` Yuan Fu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2022-11-28 23:10 UTC (permalink / raw)
  To: jostein; +Cc: 59657, Theodor Thornhill



> On Nov 28, 2022, at 4:38 AM, Jostein Kjønigsen <jostein@secure.kjonigsen.net> wrote:
> 
> Attached are a few patches for the issues found so far.
> 

Thanks, I squashed and applied them.

Yuan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-28 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <handler.59657.B.16696381765634.ack@debbugs.gnu.org>
2022-11-28 12:38 ` bug#59657: (29.0.50; lisp/progrmodes/csharp-mode.el: fontification of common constructs missing) Jostein Kjønigsen
2022-11-28 23:10   ` Yuan Fu

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).