unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#71872: 30.0.60; [PATCH] c++-ts-mode: fontify destructor in c++-ts-mode
@ 2024-07-01 10:02 Vincenzo Pupillo
  2024-07-13 10:02 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Vincenzo Pupillo @ 2024-07-01 10:02 UTC (permalink / raw)
  To: 71872

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

Ciao, 
this patch fontify destructor in c++ts-mode . 
This patch also works with emacs 31. 

Thanks.
Vincenzo

[-- Attachment #2: 0001-Fontify-destructor-in-c-ts-mode.patch --]
[-- Type: text/x-patch, Size: 946 bytes --]

From 61d4f75cff960955ed8e732757da514558b1cc94 Mon Sep 17 00:00:00 2001
From: Vincenzo Pupillo <vincenzo.pupillo@unimi.it>
Date: Mon, 1 Jul 2024 11:52:18 +0200
Subject: [PATCH] Fontify destructor in c++-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add a
rule for destructor.
---
 lisp/progmodes/c-ts-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index e7f74fc53f2..2ac163d7a7e 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -674,7 +674,9 @@ c-ts-mode--font-lock-settings
    :language mode
    :feature 'definition
    ;; Highlights identifiers in declarations.
-   `((declaration
+   `(,@(when (eq mode 'cpp)
+         '((destructor_name (identifier) @font-lock-function-name-face)))
+     (declaration
       declarator: (_) @c-ts-mode--fontify-declarator)
 
      (field_declaration
-- 
2.45.2


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

* bug#71872: 30.0.60; [PATCH] c++-ts-mode: fontify destructor in c++-ts-mode
  2024-07-01 10:02 bug#71872: 30.0.60; [PATCH] c++-ts-mode: fontify destructor in c++-ts-mode Vincenzo Pupillo
@ 2024-07-13 10:02 ` Eli Zaretskii
  2024-07-13 10:57   ` Vincenzo Pupillo
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-07-13 10:02 UTC (permalink / raw)
  To: Vincenzo Pupillo; +Cc: 71872-done

> From: Vincenzo Pupillo <v.pupillo@gmail.com>
> Date: Mon, 01 Jul 2024 12:02:34 +0200
> 
> this patch fontify destructor in c++ts-mode . 
> This patch also works with emacs 31. 

Thanks, installed on the emacs-30 release branch, and closing the bug.





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

* bug#71872: 30.0.60; [PATCH] c++-ts-mode: fontify destructor in c++-ts-mode
  2024-07-13 10:02 ` Eli Zaretskii
@ 2024-07-13 10:57   ` Vincenzo Pupillo
  0 siblings, 0 replies; 3+ messages in thread
From: Vincenzo Pupillo @ 2024-07-13 10:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71872-done

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

Thank you!
Vincenzo 

Il 13 luglio 2024 12:02:48 CEST, Eli Zaretskii <eliz@gnu.org> ha scritto:
>> From: Vincenzo Pupillo <v.pupillo@gmail.com>
>> Date: Mon, 01 Jul 2024 12:02:34 +0200
>> 
>> this patch fontify destructor in c++ts-mode . 
>> This patch also works with emacs 31. 
>
>Thanks, installed on the emacs-30 release branch, and closing the bug.

[-- Attachment #2: Type: text/html, Size: 837 bytes --]

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

end of thread, other threads:[~2024-07-13 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01 10:02 bug#71872: 30.0.60; [PATCH] c++-ts-mode: fontify destructor in c++-ts-mode Vincenzo Pupillo
2024-07-13 10:02 ` Eli Zaretskii
2024-07-13 10:57   ` Vincenzo Pupillo

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