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 09:10:08 +0300 Message-ID: <831r9iw473.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35481"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 08:10:56 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 1lp32l-00094z-U3 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 08:10:55 +0200 Original-Received: from localhost ([::1]:46006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp32l-0001AG-0a for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 02:10:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp327-0000U6-UC for emacs-devel@gnu.org; Fri, 04 Jun 2021 02:10:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57176) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp327-0004PD-4u; Fri, 04 Jun 2021 02:10:15 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4596 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 1lp326-00065E-ND; Fri, 04 Jun 2021 02:10:15 -0400 In-Reply-To: (message from Daniel Colascione on Thu, 3 Jun 2021 20:16:53 -0700) 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:270361 Archived-At: > From: Daniel Colascione > Date: Thu, 3 Jun 2021 20:16:53 -0700 > > 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? > > For years and years now, I've been thinking we just need more > deterministic parser-and-based mode support, and I still think that, but > on a realistic level, that doesn't seem to be coming any time soon. Full agreement. And not only for C and C-like languages, IMO. See https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00059.html See also Eglot and LSP. Patches more than welcome, I think having this (whether tree-sitter or some other similar technology) in core is long overdue.