From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Fri, 4 Jun 2021 03:05:53 -0700 Message-ID: <2d6d1cb0-2e8f-ceea-cb83-3bb840b65115@dancol.org> References: <831r9iw473.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18775"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 12:09:16 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 1lp6lQ-0004kr-1c for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 12:09:16 +0200 Original-Received: from localhost ([::1]:47486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp6lO-0003rj-Pn for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 06:09:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp6iE-0001TW-EX for emacs-devel@gnu.org; Fri, 04 Jun 2021 06:05:58 -0400 Original-Received: from dancol.org ([96.126.100.184]:58018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp6iB-0001oo-NZ; Fri, 04 Jun 2021 06:05:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mJUpY9Uj8GJCOijXcS2ayLFF83yoILBvDy4YexzoSuQ=; b=OCpVwr2NF2QjZUKVQ+4WijSVU9 RRLZwKMyH/HmL9EN8HPpSwRfVQu+WNNP5KhkscEwVxXIFrXkgETqhPZmhQvSaIgWCd5X0rCG+lsEC FQquQsSHEFPvgOjWDbBX1LplpPDabKYx++Par7lHZHpyVjY4XPLuGFW7BTVLKXKxpcKKGbcEKHAGp nGIg3MtAzS9+VvToPcaLK8NeJ6gg2bNHb+CgQNuSCQD64MC+S650mxeJqP9ZPLCOTKxxZJ5DKEhKJ d+2KyIrGtQrLyQ0o3k9Rvq/51mBerNhP6lPe/Fyo1WP9vIh6+J51RTS6cingh7X2hXsS7LtsIT8LS GNOWGS8A==; Original-Received: from [172.92.145.124] (port=56542 helo=[192.168.86.185]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lp6i9-00020m-Tf; Fri, 04 Jun 2021 03:05:53 -0700 In-Reply-To: <831r9iw473.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=96.126.100.184; envelope-from=dancol@dancol.org; helo=dancol.org X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.603, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:270366 Archived-At: On 6/3/21 11:10 PM, Eli Zaretskii wrote: >> 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. We could just vendor tree-sitter.