GNU bug report logs -
#60529
[PATCH] Fontify C++ function definitions in c++-ts-mode
Previous Next
Reported by: Daniel Martín <mardani29 <at> yahoo.es>
Date: Tue, 3 Jan 2023 22:16:02 UTC
Severity: normal
Tags: patch
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#60529: [PATCH] Fontify C++ function definitions in c++-ts-mode
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 60529 <at> debbugs.gnu.org.
--
60529: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60529
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Daniel Martín <mardani29 <at> 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
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
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.
[0001-Fontify-C-function-definitions-in-c-ts-mode.patch (text/patch, attachment)]
This bug report was last modified 2 years and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.