GNU bug report logs - #73877
30; rust-ts-mode: highlight the possible type suffix of number literals

Previous Next

Package: emacs;

Reported by: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>

Date: Sat, 19 Oct 2024 11:02:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Randy Taylor <dev <at> rjt.dev>
To: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
Cc: Eli Zaretskii <eliz <at> gnu.org>, "73877 <at> debbugs.gnu.org" <73877 <at> debbugs.gnu.org>, Stefan Kangas <stefankangas <at> gmail.com>
Subject: bug#73877: 30; rust-ts-mode: highlight the possible type suffix of number literals
Date: Fri, 15 Nov 2024 00:11:54 +0000
On Monday, November 11th, 2024 at 07:32, Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be> wrote:
> 
> 
> 
> Thanks Eli Zaretskii and Randy Taylor for your remarks. An undated patch is attached.
> 
> On 2 November 2024 at 20:48 +01, Randy Taylor dev <at> rjt.dev wrote:
> 
> > […] Unless I am missing something, the variables should reset
> > automatically. They are only changed in the context of the test.
> > 
> > How are you running them that you are seeing otherwise?
> 
> 
> I now am using the command line but, if I evaluate the tests (C-xC-e) and then run them with M-x ert, the variable 'rust-ts-mode-fontify-number-suffix-as-type' is not reset to its original value.
> 
> Best,
> C.

Ah, sorry. I had only tried with treesit-font-lock-level myself since
the patch didn't apply cleanly for me and I didn't have a chance to
manually apply it, and I glossed over how the variables are set
differently. If you do the same as treesit-font-lock-level, i.e.,
place it in the let instead of setq, then it will reset properly.
You will also need to: (require 'rust-ts-mode)
After you make that change, I think you should be able to get rid of
this:
+(put 'rust-ts-mode-fontify-number-suffix-as-type 'safe-local-variable
+     'booleanp)

In the font-lock-number.rs file, it looks like there is an extraneous
newline at the top of the file.

BTW the current patch still doesn't apply against the latest master
for me.




This bug report was last modified 175 days ago.

Previous Next


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