From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.bugs Subject: bug#72796: 30.0.50; [PATCH] php-ts-mode: Improved font locking Date: Mon, 26 Aug 2024 12:16:23 +0200 Message-ID: References: <26542402.1r3eYUQgxm@fedora> <9FFE9897-83A8-4760-8BFA-F1EDC4195D02@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000de5de10620936cbb" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14796"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72796-done@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 26 12:18:33 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1siWnw-0003gk-Up for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Aug 2024 12:18:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1siWnh-0007nv-Te; Mon, 26 Aug 2024 06:18:20 -0400 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 1siWnb-0007nC-Gp for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2024 06:18:11 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1siWnb-0003hH-63 for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2024 06:18:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=Khx6V6Nkpk4egqLGKn9OR85lE++igpC63cvmGg2denM=; b=Qptq5GDKJ4P2Ksa2H2hAIwe6Y47LF9JKAHTa249zo7HXTYDpF6IIJ7Qf4G7dzyGixkXfro+ykzBvjbXpNEMC+7JolalVRZrPbF4ToL5Tfumhpn2Qo9p50xDRPN7DGobjjBs0eavpiMqtfcj37zxyufPZP/NS54ucH9/ZT2TfVDHNY/KNSE2TqX2LoNdkvEphrDj3+zvoHD+rUNFAZLv0JTl/+gu6b4FgkjNSVBJvVkxAr2husUtJvvlVBT63xHaxUQmN3IbFF1aJ9szMNC07o1OzFjphjed7ZXu91WPXw5enfkYyXd3guoprlS1t7P1IJDiwLsziqtfVwGG1B9WEjg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1siWoP-00087g-Qa for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2024 06:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Aug 2024 10:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72796 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72796-done@debbugs.gnu.org id=D72796.172466753831213 (code D ref 72796); Mon, 26 Aug 2024 10:19:01 +0000 Original-Received: (at 72796-done) by debbugs.gnu.org; 26 Aug 2024 10:18:58 +0000 Original-Received: from localhost ([127.0.0.1]:43760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siWoM-00087N-4V for submit@debbugs.gnu.org; Mon, 26 Aug 2024 06:18:58 -0400 Original-Received: from mail-io1-f41.google.com ([209.85.166.41]:44107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siWoK-000878-5x for 72796-done@debbugs.gnu.org; Mon, 26 Aug 2024 06:18:56 -0400 Original-Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-829e3fbcb87so19248439f.0 for <72796-done@debbugs.gnu.org>; Mon, 26 Aug 2024 03:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724667419; x=1725272219; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Khx6V6Nkpk4egqLGKn9OR85lE++igpC63cvmGg2denM=; b=U+OCYSbqhWLLP607FZAlY0AqpD0NfIYnPewRm25vpP7hCLAoZxBJ12+aa+alACqN95 tPc5gDR1a8jHhoPgvZjDFX3WznjXeh/8PErSuXXS7r3gbjvetqF/RhZQPm7PniuveDCe RsAT2AaQTzLM527io8TyclGRPDDo//O5ny+aH3mrgeRCRGbsfJ6BzLjfZN4zoBzhfvQJ rgAUKWgPJCecF7DXYBVFnyyOdStYZNLU3tJ7WO7PbSJuJlV6MNuo3oe5pCqepXteaLcy j7Vh/cULymo5zJESyR4Z2duSWIYAdAkCms6kUXJDWdl2SxLN437rKXHDmWzt6gk+Noac QSXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724667419; x=1725272219; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Khx6V6Nkpk4egqLGKn9OR85lE++igpC63cvmGg2denM=; b=qBvLKZTW2zHMLlo4u6mPn0P0EY3bBPKIAt5uAzpkSLlSWNnAlgmTiljNLUmrKKbDhz Ysy/IKfFk6hntwVse1/yZy7re+skq9dPZ6ppXzeZIi1pnXiCnxROcKyVdkLuSIGO4t4U 9icKmUrliF3YzuYoCRkyDfs9qiKTJEYiEUxXF+//f0G04n+GmBOxMwmsSeUX0xhfsFZd a5uYWJouz3WkGL5QqR+rE4jyA59DYiGnuE3pw3dZVoLc4uFid1L2RYKrwwixVjLrdAwh SJ1vJAdHaUBeYs2QphiNtzjWH85kMpNu6cC7JkMCLpvIqnL6E/Rp+b9VZqkgKVRW9mAv 4oRg== X-Gm-Message-State: AOJu0YzXeZjEHD3Cddv1U8OKVal9Y2YPNlgByn5SoQFrcxePF7gKmun4 VcLWHqOa9ox8TLjQcllyBtSEpEvNeOg9zw0juam87IKy+CtVKLat3fqo1tzc4U5VCvb+owPpoM0 tSwe2V5L+AIWUvPwiY8Q+7ByQpm4= X-Google-Smtp-Source: AGHT+IGDddl3hoChIgaCc6cUeZhHn9R5LJbZotPaHxssa4upSKYS9sdQqNPyPjnuXx0oOGm+VNEGinUlS/Sh02vbm3Y= X-Received: by 2002:a05:6602:2b82:b0:807:aebc:3bdd with SMTP id ca18e2360f4ac-8278731c4b8mr1415367239f.5.1724667419054; Mon, 26 Aug 2024 03:16:59 -0700 (PDT) In-Reply-To: <9FFE9897-83A8-4760-8BFA-F1EDC4195D02@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290777 Archived-At: --000000000000de5de10620936cbb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Yuan. I also tested the patch with the previous version of Grammar (v0.22.5) and found no problems. Did you experience any problems? Since php-ts-mode is not available in emacs-29 and emacs-30 has not been released, perhaps it is better to support grammars from the release date. Or is it better to support from the date of the first merge? I have no idea which is the best policy. Thanks. Vincenzo Il giorno lun 26 ago 2024 alle ore 09:52 Yuan Fu ha scritto: > > > > On Aug 24, 2024, at 2:41=E2=80=AFPM, Vincenzo Pupillo > wrote: > > > > Hi, > > This patch improves font locking, particularly for constants and some > > operators. It also extends compatibility to the latest version of the > PHP > > parser. > > The patch can also be applied to version 31.0.50 . > > > > Thanks > > Vincenzo > Thanks Vince! I merged your patch to emacs-30. BTW, in the future it=E2= =80=99s > probably better to make the code work for both old and new grammar versio= ns > (whenever you can), that way people who installed the old grammar from > who-knows-where can still use the mode. (I=E2=80=99m working on some tool= to make > it simpler to define alternative font-lock rules that works on multiple > grammar versions.) > > Yuan --000000000000de5de10620936cbb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Yuan.
I also tested the patch with t= he previous version of Grammar (v0.22.5) and found no problems. Did you exp= erience any problems?
Since php-ts-mode is not available in emacs= -29 and emacs-30 has not been released, perhaps it is better to support gra= mmars from the release date. Or is it better to support from the date of th= e first merge?=C2=A0 I have no idea which is the best policy.
Tha= nks.
Vincenzo

Il giorno lun 26 ago 2024 alle ore 09:52 Yuan Fu= <casouri@gmail.com> ha scri= tto:


> On Aug 24, 2024, at 2:41=E2=80=AFPM, Vincenzo Pupillo <v.pupillo@gmail.com> wr= ote:
>
> Hi,
> This patch improves font locking, particularly for constants and some =
> operators. It also extends compatibility to the latest version of the = PHP
> parser.
> The patch can also be applied to version 31.0.50 .
>
> Thanks
> Vincenzo
Thanks Vince! I merged your patch to emacs-30. BTW, in the future it=E2=80= =99s probably better to make the code work for both old and new grammar ver= sions (whenever you can), that way people who installed the old grammar fro= m who-knows-where can still use the mode. (I=E2=80=99m working on some tool= to make it simpler to define alternative font-lock rules that works on mul= tiple grammar versions.)

Yuan
--000000000000de5de10620936cbb--