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: Define treesit-font-lock-level as buffer local Date: Sat, 09 Nov 2024 10:54:18 +0200 Message-ID: <86a5e8okhx.fsf@gnu.org> References: <4929184.OV4Wx5bFTl@3-191.divsi.unimi.it> <861pznqp9m.fsf@gnu.org> <2730223.lGaqSPkdTl@3-191.divsi.unimi.it> <39CF8919-E0A5-44D7-AA7E-ECD7465620A1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7892"; mail-complaints-to="usenet@ciao.gmane.io" Cc: v.pupillo@gmail.com, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 09 09:54:58 2024 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 1t9hFB-0001sZ-VI for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Nov 2024 09:54:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9hEd-0007JH-8p; Sat, 09 Nov 2024 03:54:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9hEb-0007Ik-Ar for emacs-devel@gnu.org; Sat, 09 Nov 2024 03:54:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9hEb-0007P3-2d; Sat, 09 Nov 2024 03:54:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=z4w7nR7KyzBlj+TyCe9JoNghKA5HHcKFGTeH0ESVv2I=; b=SOVRV++HCJwIEEXVS9dd kGm1Fs91pFr8xLVhihqA/TxiqaQj2BsBJ/5KcFUcAZICbOGz6GviNNdStnPRvOZyAh8p+vg40Rte9 E6ap/hFYnJSfVLHnXpL++4hzczNzhbxaQKDstWPYcgQOiKimnY9mJfaedyRrzKF4Q7NIeNoQ8l8c4 czGtv4jhfEHgwrbB04Q7bpRTGRIKoDws+prTcD4YurCD2TbiAJn4y7+2KM4YAuVQQjI2XpfY/tCM2 9m5Wzjkzvx97FwLzLxJVEe1NWRIdfH8KLUumB8y6PKFZl8uRcQmpkWpO42ZU21pdMhxg5prqMPdPc rBTGOlD9AUUqgg==; In-Reply-To: <39CF8919-E0A5-44D7-AA7E-ECD7465620A1@gmail.com> (message from Yuan Fu on Sat, 9 Nov 2024 00:36:31 -0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325325 Archived-At: > From: Yuan Fu > Date: Sat, 9 Nov 2024 00:36:31 -0800 > Cc: Eli Zaretskii , > emacs-devel@gnu.org > > >> Also, we could support a value of that variable which is a list, like > >> we do with font-lock-maximum-decoration. This will be more useful > >> than making the variable buffer-local, since presumably your > >> preferences are per-mode, not per-buffer. > > Yes, this would be a better solution. > > > >> Yuan, WDYT? > >> > > Perhaps even per-language, for multi-language modes. I think it’s a valid use case. IMO, specify the level by language is better than mode. For single language modes, using the language is equivalent to using the mode; for multi-language modes, using the language allows more flexibility. Patches welcome.