From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#73877: 30; rust-ts-mode: highlight the possible type suffix of number literals Date: Fri, 15 Nov 2024 00:11:54 +0000 Message-ID: <6Lmo0XWams3ZDY4jnbU-3T-4oJIwmc-2NDwLWRUj6KG305DWdW_uT3MXPN4otagtPXr7gf8QcdE3CjoIKkJUIrY9c-Ulj-QC1JNJm2yKKac=@rjt.dev> References: <874j587459.fsf@poincare.umons.ac.be> <87o739ikze.fsf@poincare.umons.ac.be> <87iktbao2j.fsf@poincare.umons.ac.be> <878qtquf1l.fsf@poincare.umons.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5525"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , "73877@debbugs.gnu.org" <73877@debbugs.gnu.org>, Stefan Kangas To: Christophe TROESTLER Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 15 01:13:35 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tBjxt-0001GL-Hj for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Nov 2024 01:13:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBjxS-0007eg-5p; Thu, 14 Nov 2024 19:13:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBjxP-0007eH-Cr for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 19:13:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBjxP-00033H-0q for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 19:13:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=YUKJveXRU6ExmAbZRAA2apTP9R04kI2Zk+fiVsrxUeU=; b=OwcyQc9Rao7sMxGQzlS09DwqC+2aK5aE46EH5eyWy0uqcYwizBg6+7p1y4nZWZ48LTaiKFgJtYARqideAIkN4dh3KULccVerrwr7pKJS8rTjtjTgYstkVEHrIef5gksDinYBD9lXpwbdYohW3de0WpjSGuhwaZHkah9XsUHX/LwrTEYZ0bk6uFKbsV6y5Ac1Q9z8Q+TgZ+C18+vmzexLeFea26pakTFMAZWwjkzk1HWfyoNV7kDvvKIgIzpwTejBeNccLiWIjrsI4HpNBMwqbP5jNCJUeC33/mPGOfW/CjCplIXTzeMtJGAcQKGry7Kvmd9hjDudCJdFnTL0BpnOqw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBjxN-0003jC-SI for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 19:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Nov 2024 00:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73877 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73877-submit@debbugs.gnu.org id=B73877.173162952814268 (code B ref 73877); Fri, 15 Nov 2024 00:13:01 +0000 Original-Received: (at 73877) by debbugs.gnu.org; 15 Nov 2024 00:12:08 +0000 Original-Received: from localhost ([127.0.0.1]:47770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBjwV-0003i4-Nw for submit@debbugs.gnu.org; Thu, 14 Nov 2024 19:12:08 -0500 Original-Received: from mail-4317.proton.ch ([185.70.43.17]:58743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBjwS-0003hY-QB for 73877@debbugs.gnu.org; Thu, 14 Nov 2024 19:12:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail3; t=1731629518; x=1731888718; bh=YUKJveXRU6ExmAbZRAA2apTP9R04kI2Zk+fiVsrxUeU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=rawJyOCjM0PFZvnpcXURcibpehIqEX1YVMmvkfGnez5gbueWfBl0bAod6DOHUyTic Kp0GrBPWyio9/eyUD5GYEkaW96NoXeZEohqHfH/aeFmERLHJolGSiACNrcJeV8gSFt 9jI5mJD/DiLzVtPRcEeA4GFBc1Z+Sgu+/hzviMaU7J9KiTYFvozuMlXMj1KBNoNYil KImdMlQNFBsGmf0jeEF/fWoExPLTGG0qI9sOvbY5jYMf+gY3v0d2qjiZqIHsBJ4s50 Of2mc9RCwU66tu20hFIkfGqOqCYJHRAefjhOtFtB4EuXuLenmMe0B8Gf5j1OHQXk2c gJ7TgauTBLEqg== In-Reply-To: <878qtquf1l.fsf@poincare.umons.ac.be> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 823344501452b9af606e3da3446251e1bd716db1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295375 Archived-At: On Monday, November 11th, 2024 at 07:32, Christophe TROESTLER wrote: >=20 >=20 >=20 > Thanks Eli Zaretskii and Randy Taylor for your remarks. An undated patch = is attached. >=20 > =EF=BB=BFOn 2 November 2024 at 20:48 +01, Randy Taylor dev@rjt.dev wrote: >=20 > > [=E2=80=A6] Unless I am missing something, the variables should reset > > automatically. They are only changed in the context of the test. > >=20 > > How are you running them that you are seeing otherwise? >=20 >=20 > 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-suff= ix-as-type' is not reset to its original value. >=20 > 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.