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, 23 Nov 2024 14:20:28 +0200 Message-ID: <868qtam99v.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> <86a5e8okhx.fsf@gnu.org> 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="35494"; 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 23 13:21:22 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 1tEp8c-00092a-3B for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Nov 2024 13:21:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEp7q-0001tb-S0; Sat, 23 Nov 2024 07:20:34 -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 1tEp7m-0001t9-FA for emacs-devel@gnu.org; Sat, 23 Nov 2024 07:20:30 -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 1tEp7m-0005gy-6r; Sat, 23 Nov 2024 07:20:30 -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=FtKacS9tNXojzwdmded/2InEEbhuLhvCuIOBmfJfRxQ=; b=dZw8pAyvb9BtD72Tj2CC jpwCUHOoWp+Dsot2ypH8QqNx1Z77SzxTKNHsdhNKMoi2Bj/MhxgXG570Im4wYntGnwwNOUfRMqMkj 0v7elXQtK3L3gP39iMaLCc5ZMrcTg1YyMIuoMCKXSUCgEflVWePrY+j9dvTRBj7O+jv/WMPfqnbT5 Ydrdg9hX3jss6wkDa69MldyeQxFSPMkH8TdiXbCR8ZFFNeMfgviaNuPMmYZz2JJILkDWzcrfzscVm e8mKacrPJlI5nM0g7HVTEpRyOaGfH0SI8X6Qv/4YU69Fj0FkDbnW/PAw4lSsp0Wu2H5MpWr+ctcJr CT10ZO7CgUTWQw==; In-Reply-To: (message from Yuan Fu on Sun, 10 Nov 2024 00:04:00 -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:325618 Archived-At: > From: Yuan Fu > Date: Sun, 10 Nov 2024 00:04:00 -0800 > Cc: Vincenzo Pupillo , > emacs-devel@gnu.org > > > > > On Nov 9, 2024, at 12:54 AM, Eli Zaretskii wrote: > > > >> 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. > > I’ll prepare one soon. Did you have time to work on this?