Subject: bug#75012: closed (Re: bug#75012: 31.0.50; Use a different face for storage_class in c-ts-mode doxygen comments)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 04 Jan 2025 08:24:03 +0000

Your bug report

#75012: 31.0.50; Use a different face for storage_class in c-ts-mode doxygen comments

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 [email-masked].

-- 
75012: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75012
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#75012: 31.0.50; Use a different face for storage_class in c-ts-mode doxygen comments
From: Yuan Fu <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: Vincenzo Pupillo <[email-masked]>, Filippo Argiolas <[email-masked]>, Stefan Kangas <[email-masked]>, [email-masked]
Date: Sat, 4 Jan 2025 00:23:10 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

> On Jan 1, 2025, at 10:43 PM, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Stefan Kangas <[email-masked]>
>> Date: Wed, 1 Jan 2025 23:00:12 -0600
>> Cc: Eli Zaretskii <[email-masked]>, Vincenzo Pupillo <[email-masked]>, [email-masked]
>> 
>> Yuan Fu <[email-masked]> writes:
>> 
>>>> On Dec 25, 2024, at 11:54 PM, Filippo Argiolas <[email-masked]> wrote:
>>>> 
>>>> I guess I'm still within the trivial realm, patch attached.
>>> 
>>> Thanks! Just to make sure, Eli, are we good to apply Filippo’s patch with assignment waiver?
>> 
>> It's less than the ~15 lines we usually allow for, and Filippo has no
>> other contributions in git, so I think we're good.
>> 
>> Don't forget to add this trailer to the commit message, as usual:
>> 
>> Copyright-paperwork-exempt: yes
> 
> Right.

Ok, thanks. I pushed the patch to master. Thanks again, Fillippo!

Yuan

Subject: 31.0.50; Use a different face for storage_class in c-ts-mode doxygen comments
From: Filippo Argiolas <[email-masked]>
To: [email-masked]
Date: Sat, 21 Dec 2024 19:21:29 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi, I was experimenting with the new local parser for doxygen comments
in c-ts-mode.

I think current syntax highlighting rules really basic and could use
some love.  One thing that would really help IMHO would be using a
different face for storage class so that e.g.

@param[in] some param

have param and [in] with two different colors. Param type is detected as
"storage_class" and that's usually fontified with font-lock-keyword-face
(e.g. like const and static in C) so I believe that would be the most
obvious choice.

I also have been experimenting with some additional rules in
c-ts-mode-doxygen-comment-font-lock-settings but they may be overkill:

   :language 'doxygen
   :override t
   :feature 'keyword
   '((tag_name) @font-lock-constant-face
     (type) @font-lock-type-face
     (emphasis) @bold
     ((tag_name) @bold (:match ".note" @bold))
     ((tag_name) @warning (:match ".warning" @warning))
     ((tag_name) @error (:match ".error" @error))
     (storageclass) @font-lock-keyword-face)

gets me something like the 'after' screenshot here[1], the 'before' now
is current faces with ef-dream theme.

What do you think?

Thanks,
Filippo

1. https://people.freedesktop.org/~fargiolas/c-ts-doxy/

In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.1.0, NS
 appkit-2575.20 Version 15.1.1 (Build 24B91)) of 2024-12-21 built on mba
Repository revision: 1c960bda91237c92f9f602bcb8538ad500c0bc49
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2575
System Description:  macOS 15.1.1

Configured using:
 'configure --with-tree-sitter --with-native-compilation'