GNU bug report logs -
#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
Previous Next
Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Date: Fri, 22 Nov 2024 13:36:02 UTC
Severity: normal
Found in version 30.0.92
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 24 Nov 2024 17:49:18 -0800
with message-id <3FC3389C-20A2-4CCC-B995-8E92A6A8591C <at> gmail.com>
and subject line Re: 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
has caused the debbugs.gnu.org bug report #74474,
regarding 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
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
74474: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74474
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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 <at> 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?
Thank you.
Vincenzo
[Message part 3 (message/rfc822, inline)]
> On Nov 23, 2024, at 11:50 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Yuan Fu <casouri <at> gmail.com>
>> Date: Sat, 23 Nov 2024 21:58:32 -0800
>> Cc: Vincenzo Pupillo <v.pupillo <at> gmail.com>,
>> 74474 <at> debbugs.gnu.org
>>
>>> Yuan, any comments?
>>
>> Thanks for the ping! I was going to push the change to emacs-30, but want to check with you first. Is it ok to push to emacs-30? As I described, the change is cosmetic, we stopped using that variable before Emacs 29 released.
>
> If you mean the change which removes this variable from those 4 files,
> then yes, please install on emacs-30, and thanks.
Great, I pushed the change to emacs-30.
Yuan
This bug report was last modified 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.