unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: 59657@debbugs.gnu.org, Yuan Fu <casouri@gmail.com>,
	Theodor Thornhill <theo@thornhill.no>
Subject: bug#59657: (29.0.50; lisp/progrmodes/csharp-mode.el: fontification of common constructs missing)
Date: Mon, 28 Nov 2022 13:38:36 +0100	[thread overview]
Message-ID: <82d4e9bb-ec4a-7a49-d8c0-c0111b9186f6@secure.kjonigsen.net> (raw)
In-Reply-To: <handler.59657.B.16696381765634.ack@debbugs.gnu.org>


[-- 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


       reply	other threads:[~2022-11-28 12:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <handler.59657.B.16696381765634.ack@debbugs.gnu.org>
2022-11-28 12:38 ` Jostein Kjønigsen [this message]
2022-11-28 23:10   ` bug#59657: (29.0.50; lisp/progrmodes/csharp-mode.el: fontification of common constructs missing) 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=82d4e9bb-ec4a-7a49-d8c0-c0111b9186f6@secure.kjonigsen.net \
    --to=jostein@secure.kjonigsen.net \
    --cc=59657@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=jostein@kjonigsen.net \
    --cc=theo@thornhill.no \
    /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).