Subject: Re: bug#72228: 31.0.50; Wrong number fontification in cmake-ts-mode

From: Andrea Corallo <[email-masked]>
Date: Wed, 07 Aug 2024 04:45:51 -0400

Randy Taylor <[email-masked]> writes:

> On Monday, July 22nd, 2024 at 22:32, Randy Taylor <[email-masked]> wrote:
>> 
>> 
>> On Sunday, July 21st, 2024 at 07:13, Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [email-masked] wrote:
>> 
>> > When using cmake-ts-mode the numbers have 3 different faces:
>> > 
>> > 1, 2, 100: font-lock-number-face (OK)
>> > 
>> > 0 : font-lock-constant-face. The cmake-ts-mode--constants takes
>> > precedence over regex in font-lock-number-face. It is not clear that
>> > this one can be fixed.
>> 
>> 
>> 1 also gets font-lock-constant-face.
>> 
>> I think we should just remove "1" and "0" from cmake-ts-mode--constants.
>> 
>> > -1, -2 : Not fontified. This seems simpler to fix, the regex in
>> > font-lock-number-face is missing a `-?' before the first [[:digit:]])
>> 
>> 
>> Indeed. Would you like to submit a patch for that and the above?
>
> I haven't heard anything back, so I've attached a patch doing so.

Hi Randy,

I've installed your change.

One comment: I'd suggest we start adding some tests for the mode in
"test/lisp/progmodes", this would help catching future potential
regressions.

Ergus or Randy feel free to close if you think we are done with this
bug.

Thanks

  Andrea