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: Tue, 08 Jun 2021 21:25:49 +0300 Message-ID: <83fsxsdxhu.fsf@gnu.org> References: <86a85d26-75c0-e4a3-e8d3-244c5346dd3a@dancol.org> <83r1hehnz9.fsf@gnu.org> <83lf7mhl3n.fsf@gnu.org> <73ff18bf-66dc-7d7a-a0db-8edc2cdceba8@gmx.at> <83o8cge4lg.fsf@gnu.org> <62e438b5-d27f-1d3c-69c6-11fe29a76d74@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18160"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, acm@muc.de, monnier@iro.umontreal.ca, rms@gnu.org, emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 08 20:27:01 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 1lqgRJ-0004SP-HF for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Jun 2021 20:27:01 +0200 Original-Received: from localhost ([::1]:60062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqgRI-0007qO-1H for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Jun 2021 14:27:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqgQX-00073h-HJ for emacs-devel@gnu.org; Tue, 08 Jun 2021 14:26:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42560) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqgQW-000159-7z; Tue, 08 Jun 2021 14:26:12 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1159 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 1lqgQQ-00044q-2Z; Tue, 08 Jun 2021 14:26:06 -0400 In-Reply-To: <62e438b5-d27f-1d3c-69c6-11fe29a76d74@dancol.org> (message from Daniel Colascione on Tue, 8 Jun 2021 11:11:21 -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:270582 Archived-At: > From: Daniel Colascione > Date: Tue, 8 Jun 2021 11:11:21 -0700 > Cc: rudalics@gmx.at, emacs-devel@gnu.org, rms@gnu.org, acm@muc.de > > The whole point of fontification is to provide visual hints about the > semantic structure of source code. If cc-mode can't do that reliably, my > preference would be for it to not do it at all. Fontification of a > type-using expression shouldn't change if I move the definition of that > type from one file to another. I think we agree. Except that for me, it should also not try if it cannot do it quickly enough, not only reliably enough. > IMHO, we should rely on LSP to figure out what symbols are types, and if > a LSP isn't available, we shouldn't try to guess. I was talking about what to do (or not to do) with our existing regexp- and "syntax"-based fontifications. I still remember the days when CC Mode handled that well enough without being a snail it frequently is now, and that was on a machine about 10 times slower than the one I use nowadays. The C language didn't change too much since then, at least not the flavor I frequently edit.