Subject: Re: bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php

From: Vincenzo Pupillo <[email-masked]>
Date: Fri, 07 Jun 2024 10:36:48 +0200

Ciao Andrea, 
I think the warning is due to html-ts-mode. It checks whether or not the parser exists, but even if it does not exist it tries to create it:
...

 (unless (treesit-ready-p 'html)
   (error “Tree-sitter for HTML isn't available”))

  (treesit-parser-create 'html)

....

I fixed it by replacing “unless” with “if” ...
Do I open another bug for this patch?

Ok for the ";; Maintainer". 
Go ahead and bother me! :D

V.

In data giovedì 6 giugno 2024 16:54:12 CEST, Andrea Corallo ha scritto:
> Vincenzo Pupillo <[email-masked]> writes:
> 
> > Hi, 
> > I would like to submit php-ts-mode. 
> > This major mode this major mode, in addition to font-lock for PHP implements the following features:
> > * font-lock for html, javascript, css and phpdoc.
> > * six different indentation styles (PSR, PEAR, Zend, Drupal, Wordpress, Symfony).
> > * Imenu
> > * Flymake
> > * Which-function
> > * a helper function to simplify the installation of parsers, in versions used to develop major-mode
> > * PHP built-in server support
> > * Shell interaction: execute PHP code in an inferior PHP process.
> >
> >
> > I completed the assignment process in March 2023.
> > Thank you.
> >
> > Vincenzo
> 
> Ciao Vincenzo,
> 
> applying the patch to the tree and building I see this warning is
> introduced on my machine.
> 
> 'Warning (treesit): Cannot activate tree-sitter, because language grammar for html is unavailable (not-found):'
> 
> Also, maybe you want to add ";; Maintainer:" as well with your name so
> we know who to bother in case? :)
> 
>   Andrea
>