GNU bug report logs - #78994
31.0.50; [PATCH] php-ts-mode: `php-ts-mode' depends on `mhtml-ts-mode' instead of JS,CSS and HTML.

Previous Next

Package: emacs;

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

Date: Fri, 11 Jul 2025 15:37:01 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

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

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Cc: 78994 <at> debbugs.gnu.org
Subject: bug#78994: 31.0.50; [PATCH] php-ts-mode: `php-ts-mode' depends on `mhtml-ts-mode' instead of JS,CSS and HTML.
Date: Thu, 07 Aug 2025 08:29:06 +0300
[You forgot to use Reply All, I think.]

> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Date: Wed, 06 Aug 2025 21:52:27 +0200
> 
> > I think at least part of the above should be in NEWS, to explain the
> > rationale for these changes.
> 
> Something like this?
> ---
> *** 'php-ts-mode' now depends on 'mhtml-ts-mode'.
> The direct dependency on js-ts-mode, css-ts-mode and html-ts-mode has
> now been replaced by ‘mhtml-ts-mode’. Navigation, Outline and Imenu work
> for all languages and code maintenance is easier.

Yes.  But remember to use two spaces between sentences.

> > > +By default should have same value as
> > > `mhtml-ts-mode-js-css-indent-offset'."
> > Only "by default"?  I'm not sure I understand what you mean by "by
> > default should" -- do you mean it is not recommended to make it
> > different from mhtml-ts-mode-js-css-indent-offset?
> 
> I mean by default we assign 2 which is the same value as 'mhtml-ts-mode-js-
> css-indent-offset’ so it looks like 'mhtml-ts-mode'.

Then maybe something like

  It is advisable to have this have the same value as
  `mhtml-ts-mode-js-css-indent-offset'.

> > > +(defcustom php-ts-mode-find-sibling-rules
> > > +  (list (list (rx "src/" (group (+ not-newline) "/") (group (+ (not
> > > "/"))) ".php") "tests/\\1\\2Test.php") +	(list (rx "tests/" (group (+
> > > not-newline) "/") (group (+ (not "/"))) "Test.php") "src/\\1\\2.php")) + 
> > > "Rules for finding sibling files as defined by `find-sibling-rules'. +As
> > > a default, the rules try to find the corresponding test of the +current
> > > source file and vice versa.  Source files are assumed to be in +src/, and
> > > tests of in tests/.  Many frameworks have a folder
> > > +arrangement similar to this."
> > 
> > Please document in the doc string the form of the value.  Something
> > like
> > 
> >   Value should be a list whose elements are of the form
> > 
> >       (FILENAME-REGEXP SIBLING-FILE)
> > 
> >   where FILENAME-REGEXP is the regexp matching...
> > 
> In the documentation I wrote that the rules are the same as those defined by 
> 'find-sibling-rules’. It might be redundant to provide an additional 
> explanation.

My impression from reading the doc string is that the rules here are
somewhat different, but if not, then maybe it's enough to make a
simple rewording will make the reference more explicit, like this:

  Rules for finding sibling files.  See `find-sibling-rules' for the
  form of the value.




This bug report was last modified 1 day ago.

Previous Next


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