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: Clarification about treesit-font-lock-settings Date: Sun, 26 Feb 2023 01:15:41 -0800 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) 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="21366"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Vincenzo Pupillo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 26 10:16:47 2023 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 1pWD9C-0005MC-UE for ged-emacs-devel@m.gmane-mx.org; Sun, 26 Feb 2023 10:16:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWD8R-0004aF-6P; Sun, 26 Feb 2023 04:15:59 -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 1pWD8O-0004Zw-P4 for emacs-devel@gnu.org; Sun, 26 Feb 2023 04:15:56 -0500 Original-Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWD8N-0007t3-7t for emacs-devel@gnu.org; Sun, 26 Feb 2023 04:15:56 -0500 Original-Received: by mail-pj1-x102e.google.com with SMTP id h17-20020a17090aea9100b0023739b10792so3382097pjz.1 for ; Sun, 26 Feb 2023 01:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=7XcTyZ5IuV4zFqr6cAKjlfgho9q/DPkwOMn3hyPjJxs=; b=SvGE+dbYljXAgSvINdco0A0KqdloPCDbO69bzldjPXe2rle3ZakyN+sYcvHU/QIeZ7 huB+jd+L1X6Ep73DNMJY9bydq6wvSk76t85apVwWn30effHdOIzqGnO7rh01X6o44KgY ro33YZSYF4l160VnkepeixkuuL2RdE5EXXXs2uITPybWmpNFberJXxVOdW1xv70YtE9j gGC9AhS/vQRin1kWf5ymzCHk+kPFr5E+gy5Bp7r0g1zERqdmco5Tpmzo/nxywVHYzs+n wQgPGCnIXHaTPW9fCumNeKnt1Wc2IJtwQ7Ju/RR8jU6kNZ0XhSYLZIBtwRCsjgYvHeFe 2efw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=7XcTyZ5IuV4zFqr6cAKjlfgho9q/DPkwOMn3hyPjJxs=; b=yvTAbH7D79TsC4yCXXmbG5fJ+HAoqggDRlT8x6+ihqwxb5ISCe4aGYAMJSk+UG2X8m cOxlv2knIVY29VIrAFU9kv0bYw3DsrKyPoamz9IfLK3tq7sEKP5ZbbNCWs6A6jeLQ7++ xMmXB9RfDLtR1dzX02Lw7Fz/EyuOex/wESFE61dXVeeZwEjix9TBENJvDTNfFNUf0fLF MhUMsjiZrSxZwcywLeJore5wP03Y3d4kiHaWKMybvyYW1WuydaCVRR66dJvDaC04XFIt arzVV1IhEmPyj4CsW4EM3/po7lnzicFS8c/aRlYGJApVPQcrsh2RTYCVww2NMHYOp5Qt rFLw== X-Gm-Message-State: AO0yUKXVky8ZGSZHVOezgeSRFGxifjTTParELiz+VZhYuXZkHF3KMfld Hgg2p4icl8+6SBuy60yBWkg= X-Google-Smtp-Source: AK7set9qCszfswEuJ6SKJuoMnRpHuCL+KiAbODoeJB8pllq7CAngnceeC1sQDvfZAmjXtDhgOreaFQ== X-Received: by 2002:a17:902:ce90:b0:196:3088:5dd6 with SMTP id f16-20020a170902ce9000b0019630885dd6mr25718660plg.13.1677402952536; Sun, 26 Feb 2023 01:15:52 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id 17-20020a170902c15100b0019c33775574sm2325034plj.198.2023.02.26.01.15.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Feb 2023 01:15:52 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3731.400.51.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=casouri@gmail.com; helo=mail-pj1-x102e.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:303820 Archived-At: > On Feb 25, 2023, at 2:18 PM, Vincenzo Pupillo = wrote: >=20 > Okay, I figured out how to do it: > :language 'php > :feature 'attribute > '((((attribute (_) @attribute_name) @font-lock-preprocessor-face) = (:match "Deprecated" @attribute_name))) >=20 > However, I cannot understand why "treesit-query-validate" says the = query is correct, but I get an error. >=20 > Thank you. > Vincenzo Sorry that I missed your message! treesit-query-validate simply compiles = the query and rely on tree-sitter to report any potential error. But = predicates like #match and #equal are delegated to Emacs to handle, so = tree-sitter doesn=E2=80=99t check for their arity and there is no error = during compilation. Also, the error message should say =E2=80=9C#match=E2=80= =9D instead of =E2=80=9C#equal=E2=80=9D, I fixed that typo. Yuan=