From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Fri, 04 Jun 2021 13:25:22 +0300 Message-ID: <83y2bqudt9.fsf@gnu.org> References: <831r9iw473.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26119"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ubolonton@gmail.com, dancol@dancol.org, joaotavora@gmail.com, emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 12:26:22 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lp71x-0006fo-Tc for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 12:26:21 +0200 Original-Received: from localhost ([::1]:47104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp71w-0006Sr-Gj for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 06:26:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp719-0005gQ-Gm for emacs-devel@gnu.org; Fri, 04 Jun 2021 06:25:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45038) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp717-0006eG-Kq; Fri, 04 Jun 2021 06:25:29 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4606 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp717-00066f-7A; Fri, 04 Jun 2021 06:25:29 -0400 In-Reply-To: (message from Theodor Thornhill on Fri, 04 Jun 2021 09:10:33 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270369 Archived-At: > From: Theodor Thornhill > Cc: emacs-devel@gnu.org, ubolonton@gmail.com, joaotavora@gmail.com > Date: Fri, 04 Jun 2021 09:10:33 +0200 > > >> As long as I can remember, cc-mode fontification has felt totally > >> random, with actual faces depending on happenstance of previously-parsed > >> types, luck of the draw in jit-lock chunking, and so on. Is there any > >> *general* way that we can make fontification more robust and consistent? > > Yes, tree-sitter. Ubolonton has made a tremendous package implementing > this for emacs. It is used in csharp-mode already, with success. At > least for the fontification. There are still some kinks to work out in > the indentation part of the mode. Not from my POV, see my other message. I welcome patches submitted to the project with the goal of integrating that into Emacs core. Past discussions indicated to me that authors of the existing packages are not interested in that enough to modify the packages according to our suggestions. Sorry to be blunt.