From: Eli Zaretskii <eliz@gnu.org>
To: Vincenzo Pupillo <v.pupillo@gmail.com>, Yuan Fu <casouri@gmail.com>
Cc: 74474@debbugs.gnu.org
Subject: bug#74474: 30.0.92; treesit-defun-prefer-top-level is still used in js, ruby-ts-mode, typescript-ts-mode, c-ts-mode and php-ts-mode
Date: Fri, 22 Nov 2024 16:08:03 +0200 [thread overview]
Message-ID: <865xofnyyk.fsf@gnu.org> (raw)
In-Reply-To: <1951718.7Z3S40VBb9@fedora> (message from Vincenzo Pupillo on Fri, 22 Nov 2024 14:35:50 +0100)
> From: Vincenzo Pupillo <v.pupillo@gmail.com>
> Date: Fri, 22 Nov 2024 14:35:50 +0100
>
> Ciao,
> I am writing a treesitter-based version of mhtml (email threads https://
> lists.gnu.org/archive/html/emacs-devel/2024-11/msg00079.html).
> I started from what I did for php-ts-mode.
> In php-ts-mode the variable treesit-defun-prefer-top-level is initialized to
> t.
> This variable, whose use I had borrowed from c-ts-mode, no longer exists.
> >From the Changelog.4 :
> 2022-12-19 Stefan Kangas <stefankangas@gmail.com>
>
> Merge from origin/emacs-29
>
> 67bc96c9d94 Remove treesit-defun-prefer-top-level and friends
> 4f9bccef556 Add yaml-ts-mode (Bug#60105)
> f9cb144d45a Fix indentation in json-ts-mode (bug#60123)
> 3d348c46e78 ; Handle nil ARG in treesit-beginning/end-of-defun
> 1a66435dda3 New input method 'cyrillic-chuvash'
> b9227c502d7 ; Improve wording of 'format' doc string
>
> This variable is also used by other major modes, with different value:
>
> lisp/progmodes/c-ts-mode.el
> 1259: (setq-local treesit-defun-prefer-top-level t)
>
> lisp/progmodes/typescript-ts-mode.el
> 465: (setq-local treesit-defun-prefer-top-level t)
>
> lisp/progmodes/ruby-ts-mode.el
> 1202: (setq-local treesit-defun-prefer-top-level nil)
>
> lisp/progmodes/js.el
> 3919: (setq-local treesit-defun-prefer-top-level t)
>
> treesit-defun-prefer-top-level should have been replaced by treesit-defun-
> tactic which, however, is initialized by default with a value that should
> match only (setq treesit-defun-prefer-top-level nil).
>
> Is it possible that this is related to problems similar to those indicated in
> bug#73404?
Yuan, any comments?
next prev parent reply other threads:[~2024-11-22 14:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 13:35 bug#74474: 30.0.92; treesit-defun-prefer-top-level is still used in js, ruby-ts-mode, typescript-ts-mode, c-ts-mode and php-ts-mode Vincenzo Pupillo
2024-11-22 14:08 ` Eli Zaretskii [this message]
2024-11-24 5:58 ` Yuan Fu
2024-11-24 7:50 ` Eli Zaretskii
2024-11-25 1:49 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=865xofnyyk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74474@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=v.pupillo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).