From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Define treesit-font-lock-level as buffer local Date: Sun, 10 Nov 2024 00:04:00 -0800 Message-ID: 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 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6364"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Vincenzo Pupillo , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 10 09:05:02 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 1tA2wQ-0001VE-3L for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Nov 2024 09:05:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA2vi-0007e3-SI; Sun, 10 Nov 2024 03:04:18 -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 1tA2vg-0007cu-Un for emacs-devel@gnu.org; Sun, 10 Nov 2024 03:04:16 -0500 Original-Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tA2vf-0002Cr-HN; Sun, 10 Nov 2024 03:04:16 -0500 Original-Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-7ede6803585so3338782a12.0; Sun, 10 Nov 2024 00:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731225853; x=1731830653; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AG6ZwCTLfdjX4wuPHsuGqDSJ5FMSvQLss3M8zrzkofc=; b=XeKE9xgBo8llC/vDb5aT9ElOXrS5i4/a3/IMQAJ37dXgzSwUy1gnLDJ5fwpH6v4cJZ BPwcuh4N0C8uhUzFf+wQMHgUxNVaKlny9faz51vTKezZJ329wMqVUzlK6R7E7+83L0+G lOIJkh4+ex1gNUJMCSVCfdz8yjDnsKyv4RnwnktyDiYeIWQxpDK7U3K4Ieyql+OJln0v NlEmBOEhta9onFUVJZDjdjTr4oy8Q3mEkPgCWhWwlTlIjvMKymq0Vz0grlPsXx5B98Pc P7r7hh3zCsWzhVveCnGaGhbKNiInjxH4igvxN4DHlCr7yOvfs7v2XXZ3JyjIaZbBn7R9 LOAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731225853; x=1731830653; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AG6ZwCTLfdjX4wuPHsuGqDSJ5FMSvQLss3M8zrzkofc=; b=PNuOAawjgLk1yTc72zg2o1VeCCnfs+3mcSpFVO6Krx4mOjZxRXN+7Ngr0NzE78ZKMG pP01s6AkWJHqTOoEZ42jfal/R4UQcnn++xQuAjX9o7WQzQjesYaqEvD1LbccjM/snGuU MNpWKhZpdQpEIsAde0hfyoEC8YxuoPGaSFK/Jn6Oq3yV8Lt/XC1+C73u/ICg8WRIh/SB qO3S5OQVJHj6zAMP9Ruyy/fpzt8h5Uz2/QjAYISgToNUzFbLbNXyvIFzHe7bLKU+XpeA RcebM+fIQDCGNlzNm1DO0gsjSD4SbYqhlHYIYSxF8GqvzOhdVfP733vDODh49s/b4BCT uhRA== X-Forwarded-Encrypted: i=1; AJvYcCUaBicN+qQ0fxkkbQLFLpqCIvAo5yZLgZUFIX9fmGArOdWlCZkV56dUykVu7tDRN2b3sjjQMKl3wy8EhQ==@gnu.org X-Gm-Message-State: AOJu0YyVmbiSS7d4FRbolyCgLyJm/4TKzArIQAvBKTVVjuoSobvKWHUC zhU1Rt9tNrKMHEAtAN/4YWzFUchEHk+Xn5hepdT5U2GgKMz4f0FOpEgMQapn X-Google-Smtp-Source: AGHT+IE4pDztIjDGDQlURzDokOy35zOOkGXwIaggeRMoK2hU/mDLQnVmTR4f0X30qwX7LyzuoPunKw== X-Received: by 2002:a17:90b:1805:b0:2e9:3056:71dd with SMTP id 98e67ed59e1d1-2e9b0a31d44mr12707991a91.7.1731225852688; Sun, 10 Nov 2024 00:04:12 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:1524:1329:2a87:2c60]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e99a62b9bfsm8466032a91.49.2024.11.10.00.04.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Nov 2024 00:04:12 -0800 (PST) In-Reply-To: <86a5e8okhx.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=casouri@gmail.com; helo=mail-pg1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.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:325367 Archived-At: > On Nov 9, 2024, at 12:54=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Sat, 9 Nov 2024 00:36:31 -0800 >> Cc: Eli Zaretskii , >> emacs-devel@gnu.org >>=20 >>>> 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. =20 >>> Yes, this would be a better solution. >>>=20 >>>> Yuan, WDYT? >>>>=20 >>=20 >> Perhaps even per-language, for multi-language modes. I think it=E2=80=99= 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.=20 >=20 > Patches welcome. I=E2=80=99ll prepare one soon. Yuan=