GNU bug report logs - #69625
30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Fri, 8 Mar 2024 04:45:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Yuan Fu <casouri <at> gmail.com>
Subject: bug#69625: closed (Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode
 doesn't fontify some enum)
Date: Sat, 06 Jul 2024 21:12:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum

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 69625 <at> debbugs.gnu.org.

-- 
69625: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69625
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Randy Taylor <dev <at> rjt.dev>, 69625-done <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>, Dmitry Gutov <dmitry <at> gutov.dev>
Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum
Date: Sat, 6 Jul 2024 14:10:12 -0700

> On Jul 6, 2024, at 1:05 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> Cc: Dmitry Gutov <dmitry <at> gutov.dev>, Stefan Kangas <stefankangas <at> gmail.com>,
>> 69625 <at> debbugs.gnu.org
>> Date: Sat, 29 Jun 2024 19:08:47 +0000
>> From: Randy Taylor <dev <at> rjt.dev>
>> 
>> On Saturday, June 29th, 2024 at 01:41, Yuan Fu <casouri <at> gmail.com> wrote:
>>> 
>>> 
>>>> On Jun 28, 2024, at 8:03 PM, Stefan Kangas stefankangas <at> gmail.com wrote:
>>>> 
>>>> Randy Taylor dev <at> rjt.dev writes:
>>>> 
>>>>> Sounds good, we can consider an option if anyone complains.
>>>>> This is for master, right?
>>>> 
>>>> Yeah, it's probably too late for Emacs 30.
>>>> 
>>>> That said, if the patch is very small and/or trivial, and well-tested,
>>>> we sometimes make exceptions for important changes. I have no idea if
>>>> any of that would apply here, so I'm mentioning it for completion.
>>> 
>>> 
>>> I would apply it to master. So that people on master would have time to complain, if ever.
>>> 
>>> Yuan
>> 
>> We're on the same wavelength :).
> 
> Ping! Can we complete this by installing the patch, please?
> 
> I don't see any patches in this discussion.  If someone knows what is
> the patch, please either post it here or install on master.
> 
> Thanks.

I installed 2e9777512a0 to master.

Yuan


[Message part 3 (message/rfc822, inline)]
From: Yuan Fu <casouri <at> gmail.com>
To: Bug Report Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum
Date: Thu, 7 Mar 2024 20:43:51 -0800
X-Debug-CC: dev <at> rjt.dev <mailto:dev <at> rjt.dev>

(I lied a little bit about on the [PATCH] part: I have a solution but didn’t turn it into a patch yet.)

The problem is follows: given the rust code below, some enum are not fontified with type face under font lock level 3, and those enum are fontified as function or variable under font lock level 4.

fn main() {
    func(MyEnum::VariantA(0));
    func(MyEnum::VariantB);
    func(VariantC);
    func(VariantD(0));
}

VariantA and VariantB are fontified correctly, but VariantC and VariantD are not.

I think a simple rule that fontifies every capitalized identifier would fix this. But I don’t know if that’ll create other problem. AFAIK capitalized identifier is always some type in rust, right?

This is first reported on rust-mode’s GitHub repo: https://github.com/rust-lang/rust-mode/issues/518

Yuan


This bug report was last modified 1 year and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.