emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60529: closed ([PATCH] Fontify C++ function definitions in c++-ts-mo


From: GNU bug Tracking System
Subject: bug#60529: closed ([PATCH] Fontify C++ function definitions in c++-ts-mode)
Date: Wed, 04 Jan 2023 06:51:02 +0000

Your message dated Tue, 3 Jan 2023 23:50:08 -0700
with message-id <F2A9DE96-27F1-4223-82DD-EF96E616452F@gmail.com>
and subject line Re: bug#60529: [PATCH] Fontify C++ function definitions in 
c++-ts-mode
has caused the debbugs.gnu.org bug report #60529,
regarding [PATCH] Fontify C++ function definitions in c++-ts-mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60529: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60529
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Fontify C++ function definitions in c++-ts-mode Date: Tue, 03 Jan 2023 23:15:41 +0100
Tags: patch


Given the following valid C++ code:

void Foo::bar() {

}

c++-ts-mode should fontify bar with the font-lock-function-name-face
face.  The attached patch adds support for fontifying function
declarations whose identifier is "buried" inside qualified_identifier
nodes.

I've checked that the patch also fontifies bar in

void Foo::Bar::bar() {

}

but fontifies bar with font-lock-variable-name-face face in the
following cases:

Foo::Bar::Bar2 bar;
Foo::Bar bar;

I don't check for C++ mode in the code, as I think the impact of this
new check should be negligible for C code, but I'm open to feedback.

Thanks.

Attachment: 0001-Fontify-C-function-definitions-in-c-ts-mode.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#60529: [PATCH] Fontify C++ function definitions in c++-ts-mode Date: Tue, 3 Jan 2023 23:50:08 -0700
Daniel Martín <mardani29@yahoo.es> writes:

> Tags: patch
>
>
> Given the following valid C++ code:
>
> void Foo::bar() {
>
> }
>
> c++-ts-mode should fontify bar with the font-lock-function-name-face
> face.  The attached patch adds support for fontifying function
> declarations whose identifier is "buried" inside qualified_identifier
> nodes.
>
> I've checked that the patch also fontifies bar in
>
> void Foo::Bar::bar() {
>
> }
>
> but fontifies bar with font-lock-variable-name-face face in the
> following cases:
>
> Foo::Bar::Bar2 bar;
> Foo::Bar bar;
>
> I don't check for C++ mode in the code, as I think the impact of this
> new check should be negligible for C code, but I'm open to feedback.
>
> Thanks.

Makes sense. I applied the patch. Thanks!

Yuan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]