From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 12 Jun 2021 09:51:38 -0400 Message-ID: References: <83o8cge4lg.fsf@gnu.org> <62e438b5-d27f-1d3c-69c6-11fe29a76d74@dancol.org> <83fsxsdxhu.fsf@gnu.org> <83pmwudgw3.fsf@gnu.org> <20210610151647.qtt7pqbjhdtp6coe@Ergus> <20210611202130.j35q6k4utjivzuen@Ergus> <9e76076e-636d-9271-03e2-98c7614e3cf1@dancol.org> <83v96j8tsl.fsf@gnu.org> <179ff3ee6d8.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , , , , , To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 12 15:52:32 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 1ls43s-0008Io-F8 for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 15:52:32 +0200 Original-Received: from localhost ([::1]:34920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls43q-0005Wq-Vp for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Jun 2021 09:52:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls437-0004r1-MF for emacs-devel@gnu.org; Sat, 12 Jun 2021 09:51:45 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls435-0005Bl-Aa; Sat, 12 Jun 2021 09:51:44 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4C31F1002FC; Sat, 12 Jun 2021 09:51:41 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E9BFA100201; Sat, 12 Jun 2021 09:51:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1623505899; bh=vZEtKEj02cK64tyfczXG6H1gLq/H3Cqt4E/Yv5ICAWM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jtB6J0e++3jp3/PDX115HDr73sTrMaFA4rN3PzVHmbJjdSweASYiP5dolb6SZIGAy IP9DTFVEh9I7JRgaEnspKYqrd9d6ZwgPiJnepbjxs4xxLsodC0JLwESzHeShrvvNP2 23XfpZT+9Ky8u2qN+t/DYyET2s88mN8TsvyeJjz3ovwLtKL/fttkJruHZ7T7Xg/nd1 MOX0TqZl7x5kN6oMn5mpcQHvV7QVstwJlKiZIiqw6vBrS4UKPDevtyMbxxcKp8+24B 7r/LEjdegVKHwTSfmxUnT/2RlHsGwlHa38gcguJ6fFgvvnwZjIRLO4rOZavfhFsD0l eH6ILuAE8+lHw== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9726612033F; Sat, 12 Jun 2021 09:51:39 -0400 (EDT) In-Reply-To: <179ff3ee6d8.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> (Daniel Colascione's message of "Sat, 12 Jun 2021 01:03:03 -0700") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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:270759 Archived-At: > Sure, but it'd be nice to package TS in such a way that it becomes more > idiomatically lispy, at least if TS becomes the primary fontification engine > for some modes. At the very least, it should be possible for users to apply > ad hoc fontification on top of whatever TS supports. And how could something > like TS work with, say, bison and flex files without fully general > multi-mode support (which we also lack)? While I don't think you can compose compiled tree-sitter grammars, the source grammars can easily be composed, so tree-sitter is perfectly able to handle "multi-mode" buffers. Stefan