all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: 60529-done@debbugs.gnu.org
Subject: bug#60529: [PATCH] Fontify C++ function definitions in c++-ts-mode
Date: Tue, 3 Jan 2023 23:50:08 -0700	[thread overview]
Message-ID: <F2A9DE96-27F1-4223-82DD-EF96E616452F@gmail.com> (raw)
In-Reply-To: <m1edsbgt82.fsf@yahoo.es>


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





      reply	other threads:[~2023-01-04  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1edsbgt82.fsf.ref@yahoo.es>
2023-01-03 22:15 ` bug#60529: [PATCH] Fontify C++ function definitions in c++-ts-mode Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-04  6:50   ` Yuan Fu [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F2A9DE96-27F1-4223-82DD-EF96E616452F@gmail.com \
    --to=casouri@gmail.com \
    --cc=60529-done@debbugs.gnu.org \
    --cc=mardani29@yahoo.es \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.