GNU bug report logs - #73779
30.0.91; [PATCH] php-ts-mode: Better indentation and font locking, support for the latest grammar version.

Previous Next

Package: emacs;

Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>

Date: Sat, 12 Oct 2024 21:03:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.91

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73779 in the body.
You can then email your comments to 73779 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73779; Package emacs. (Sat, 12 Oct 2024 21:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincenzo Pupillo <v.pupillo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 12 Oct 2024 21:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.91; [PATCH] php-ts-mode: Better indentation and font locking,
 support for the latest grammar version.
Date: Sat, 12 Oct 2024 22:12:30 +0200
[Message part 1 (text/plain, inline)]
Ciao,
this patch corrects the indentation of the control structure without closing 
brackets (or without the end keyword... in the case of the alternative 
syntax). It supports font locking of the “asymmetric property visibility ” 
introduced with grammar v0.23.3 and so-called magic methods. And others small 
fix. And others small bug I discovered while writing the tests..

Thank you.
Vincenzo

[0001-Fix-php-ts-mode-better-indentation-and-font-locking.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73779; Package emacs. (Sun, 13 Oct 2024 05:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 73779 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Cc: 73779 <at> debbugs.gnu.org
Subject: Re: bug#73779: 30.0.91;
 [PATCH] php-ts-mode: Better indentation and font locking, support for
 the latest grammar version.
Date: Sun, 13 Oct 2024 07:59:23 +0300
> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Date: Sat, 12 Oct 2024 22:12:30 +0200
> 
> this patch corrects the indentation of the control structure without closing 
> brackets (or without the end keyword... in the case of the alternative 
> syntax). It supports font locking of the “asymmetric property visibility ” 
> introduced with grammar v0.23.3 and so-called magic methods. And others small 
> fix. And others small bug I discovered while writing the tests..

Thank you.

I have two questions about this:

  . will the code which uses the "asymmetric property visibility" also
    work without problems with versions of the grammar library before
    0.23.3?
  . do you consider the code changes to be tested well enough and thus
    safe to be installed on the emacs-30 release branch?

I'd prefer to install on emacs-30, because this mode is new in Emacs
30, unless you are not sure the code is safe enough.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73779; Package emacs. (Sun, 13 Oct 2024 09:21:02 GMT) Full text and rfc822 format available.

Message #11 received at 73779 <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73779 <at> debbugs.gnu.org
Subject: Re: bug#73779: 30.0.91;
 [PATCH] php-ts-mode: Better indentation and font locking,
 support for the latest grammar version.
Date: Sun, 13 Oct 2024 11:19:31 +0200
Ciao Eli,

> I have two questions about this:
> 
>   . will the code which uses the "asymmetric property visibility" also
>     work without problems with versions of the grammar library before
>     0.23.3?

Yes, I tested it with older versions of the grammars. 
'php-ts-mode--test-visibility-modifier-operation-clause-p' is used to check if 
this new feature is defined or not, and behaves accordingly.

>   . do you consider the code changes to be tested well enough and thus
>     safe to be installed on the emacs-30 release branch?
> 
Yes, I've been using this patch at work for about a week and haven't had any 
problems.

> I'd prefer to install on emacs-30, because this mode is new in Emacs
> 30, unless you are not sure the code is safe enough.

Thank you.

Vincenzo







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73779; Package emacs. (Fri, 18 Oct 2024 06:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 73779 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Cc: 73779 <at> debbugs.gnu.org
Subject: Re: bug#73779: 30.0.91;
 [PATCH] php-ts-mode: Better indentation and font locking,
 support for the latest grammar version.
Date: Fri, 18 Oct 2024 09:51:13 +0300
> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Cc: 73779 <at> debbugs.gnu.org
> Date: Sun, 13 Oct 2024 11:19:31 +0200
> 
> > I have two questions about this:
> > 
> >   . will the code which uses the "asymmetric property visibility" also
> >     work without problems with versions of the grammar library before
> >     0.23.3?
> 
> Yes, I tested it with older versions of the grammars. 
> 'php-ts-mode--test-visibility-modifier-operation-clause-p' is used to check if 
> this new feature is defined or not, and behaves accordingly.
> 
> >   . do you consider the code changes to be tested well enough and thus
> >     safe to be installed on the emacs-30 release branch?
> > 
> Yes, I've been using this patch at work for about a week and haven't had any 
> problems.

I was about to install this, but byte-compiling the modified file
yields the following warnings:

    ELC      progmodes/php-ts-mode.elc

  In php-ts-mode--open-statement-group-heuristic:
  progmodes/php-ts-mode.el:435:58: Warning: Unused lexical argument `parent'
  progmodes/php-ts-mode.el:499:50: Warning: argument `_bol' not left unused
  progmodes/php-ts-mode.el:518:56: Warning: argument `_bol' not left unused

Could you please fix these and resubmit the patch?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73779; Package emacs. (Sat, 19 Oct 2024 12:16:01 GMT) Full text and rfc822 format available.

Message #17 received at 73779 <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73779 <at> debbugs.gnu.org
Subject: Re: bug#73779: 30.0.91;
 [PATCH] php-ts-mode: Better indentation and font locking,
 support for the latest grammar version.
Date: Sat, 19 Oct 2024 14:13:33 +0200
[Message part 1 (text/plain, inline)]
> I was about to install this, but byte-compiling the modified file
> yields the following warnings:
> 
>     ELC      progmodes/php-ts-mode.elc
> 
>   In php-ts-mode--open-statement-group-heuristic:
>   progmodes/php-ts-mode.el:435:58: Warning: Unused lexical argument `parent'
> progmodes/php-ts-mode.el:499:50: Warning: argument `_bol' not left unused
> progmodes/php-ts-mode.el:518:56: Warning: argument `_bol' not left unused
> 
> Could you please fix these and resubmit the patch?

Sorry Eli, it's okay now.
Thank you.

Vincenzo
[0001-Fix-php-ts-mode-better-indentation-and-font-locking.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 19 Oct 2024 13:17:02 GMT) Full text and rfc822 format available.

Notification sent to Vincenzo Pupillo <v.pupillo <at> gmail.com>:
bug acknowledged by developer. (Sat, 19 Oct 2024 13:17:02 GMT) Full text and rfc822 format available.

Message #22 received at 73779-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Cc: 73779-done <at> debbugs.gnu.org
Subject: Re: bug#73779: 30.0.91;
 [PATCH] php-ts-mode: Better indentation and font locking,
 support for the latest grammar version.
Date: Sat, 19 Oct 2024 16:13:43 +0300
> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Cc: 73779 <at> debbugs.gnu.org
> Date: Sat, 19 Oct 2024 14:13:33 +0200
> 
> > I was about to install this, but byte-compiling the modified file
> > yields the following warnings:
> > 
> >     ELC      progmodes/php-ts-mode.elc
> > 
> >   In php-ts-mode--open-statement-group-heuristic:
> >   progmodes/php-ts-mode.el:435:58: Warning: Unused lexical argument `parent'
> > progmodes/php-ts-mode.el:499:50: Warning: argument `_bol' not left unused
> > progmodes/php-ts-mode.el:518:56: Warning: argument `_bol' not left unused
> > 
> > Could you please fix these and resubmit the patch?
> 
> Sorry Eli, it's okay now.

Thanks, installed on the emacs-30 branch, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Nov 2024 12:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.