GNU bug report logs -
#79215
31.0.50; emacs build fails with tree-sitter (bisected)
Previous Next
Reported by: German Pacenza <germanp82 <at> hotmail.com>
Date: Mon, 11 Aug 2025 11:40:01 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 79215 <at> debbugs.gnu.org (full text, mbox):
> From: Juri Linkov <juri <at> linkov.net>
> Cc: German Pacenza <germanp82 <at> hotmail.com>, Vincenzo Pupillo
> <v.pupillo <at> gmail.com>, 79215 <at> debbugs.gnu.org
> Date: Mon, 11 Aug 2025 19:20:24 +0300
>
> > Thanks. Does the patch below fix the problem?
> > [...]
> > - (when (treesit-ensure-installed 'jsdoc)
> > + (when (treesit-language-available-p 'jsdoc t)
>
> 'c-ts-mode' uses such a nice solution that the 'doxygen' grammar
> that more-less corresponds to the 'jsdoc' grammar has
> a user option 'c-ts-mode-enable-doxygen' that is used like this:
>
> (when (and c-ts-mode-enable-doxygen
> (treesit-ensure-installed 'doxygen))
>
> 'jsdoc' could do the same with a new option
> 'js-ts-mode-enable-jsdoc'.
The above code is not run when mhtml-ts-mode is activated, it is run
when the file is loaded, because it is part of the default value of a
defvar. So in that case we simply should silently avoid the
evaluation if the grammar is not available, regardless of the user
option, I think.
I do agree that a similar option could be a good idea for
mhtml-ts-mode, but that would be unrelated to this code.
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.