From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs 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: Sat, 23 Nov 2024 21:58:32 -0800 Message-ID: <314BA6F4-E5A2-4137-A635-B578B67AADEE@gmail.com> References: <1951718.7Z3S40VBb9@fedora> <865xofnyyk.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5254"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Vincenzo Pupillo , 74474@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 24 07:00:34 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tF5fd-0001FV-Hv for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Nov 2024 07:00:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tF5fE-000744-9X; Sun, 24 Nov 2024 01:00:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tF5f9-00070E-74 for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 01:00:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tF5f8-0006Kz-TN for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 01:00:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=kwgXi5/nSoZshChAXzxxzJzeregWZismaSRGlp41Whc=; b=uxsWEQ8CilG9G8uSHDhVw7wNOsLvxNEeqPdMhuCrBi5jzeyANdwDjl9S/rYCAF9FJres6XogsUy3Z4QXtP+XJ5p4Ff7bdzsESEG8jXjMU9SM2IdE6Sa0EN5GAehGeYkj4x9MgscPDwrHPfVPXkMnQYSQFnXlM0gmkWy9AiwBPWJ7kUwMf7IqCRw28my5y0sXFMdPLW5zBZ+17p/pDRlGpMG6SYCVLyAepLkvh6Rgmx/gfA33MEwZS9ENXStodNQsWG1UTy9dB2hzRSVG1Wpr8OI4hoMUvNglR4fkcVTo8LzVcIjKsc9IyjBYTrQJ6vi+nP2zF98DKcDjgj2R74/KIA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tF5f8-0006oD-Fm for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 01:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Nov 2024 06:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74474 X-GNU-PR-Package: emacs Original-Received: via spool by 74474-submit@debbugs.gnu.org id=B74474.173242798826122 (code B ref 74474); Sun, 24 Nov 2024 06:00:02 +0000 Original-Received: (at 74474) by debbugs.gnu.org; 24 Nov 2024 05:59:48 +0000 Original-Received: from localhost ([127.0.0.1]:60384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF5et-0006nE-O3 for submit@debbugs.gnu.org; Sun, 24 Nov 2024 00:59:48 -0500 Original-Received: from mail-pl1-f175.google.com ([209.85.214.175]:49580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF5er-0006n5-W8 for 74474@debbugs.gnu.org; Sun, 24 Nov 2024 00:59:46 -0500 Original-Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-21285c1b196so33345425ad.3 for <74474@debbugs.gnu.org>; Sat, 23 Nov 2024 21:59:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732427925; x=1733032725; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kwgXi5/nSoZshChAXzxxzJzeregWZismaSRGlp41Whc=; b=d19//kYnLg2ixS/t04BefqKWh/Ql65hEh6gAHo1D96mXu1+Ih1ACMk2/iRsmo8Asgt bJbrouefOm84m94f/g2m5aG6kDzjqERgDLULbTfxIkb7t2xJ/aUdmnLbaSAGKLtbMImU IELjZQJ5vugXB84oWxY9Llr35LX/5BTQo/qBZx3pAWrzTopgllwriP91yAFWcAVxU2jF V1Hd9P+X67rptz5XlhIwJKZV1a7ro0t5SDUT5z7Sth4ykoGGmXzfL+2g9o3OWCQNANwh z92znn2xAJNxgCkKXvKNhy5DC9fzfdExDf3RKEEqIb/oevboONIWMT+eTS8/MOHhVIvK by4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732427925; x=1733032725; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kwgXi5/nSoZshChAXzxxzJzeregWZismaSRGlp41Whc=; b=pGqTTXPDkR8iFOEdGYEdT99SlRiUViyUu65mf0gOB9lGmitQSxj9tm6ugZy1D2rsjx IaGhNkOFpICcaVM9GhSz1oziMdMbeCX1qbHTNkQ9hJTm4gjg5ZSK7aBCQ1RJTcawGIr8 eENd3p/3PkEZBqRAxM4jXuhfWIyOCf3bxgLNaMGwExctoqowKfnYnOTF2ctLy1GefkAA r0SWIicIYTAg8AoFOD/AiJr9OMwbVCf7/olutp1vkfSYkp8oD6iDC97dYoeOAlvmPkyV vXAPRyx2tA7/0R0pHLjbkaEwYh8Cq8qpQRi5sZAM+4OFOteDZ/VngYrb5KLLFugFSA3Y BVwQ== X-Forwarded-Encrypted: i=1; AJvYcCW0AidaaqJZR5ut8CI+fGnl98ICTLcjuPspWt8Ip/YjReF5itxu8H5IyvMgGSBBtLOorRvkCg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzKvFIR5fKGAodSM1Nt0MRaH/nc9u7sbV7Z7lWrqjDPVLaOnbCd zqSUjOBBNbgSCQV0u5oS2AWgiuV4xhYzmlOWjvZScxM7s/COBSU7 X-Gm-Gg: ASbGncuiPsZ1GAnoc9F7T+m8GqeSeih16tmaJ4QM9IQtru9c5ekvc9bPHadjS/wRgcO ZW7NkYFMLpRNJekEbPi0FJQcmoum0aCTyEFkiFjvdx4PbG7Cc6fSpZsOuZXzxCBWM4Yp0GrJ2vV JfrLA86DGPJKh9z/umohj7OcQTCYFU9ZKatJgbmeT49AYUyZj98dYMo8N39XV7NYjGBFno/JXDf AmAhk/y8v+dxtAQqZoJUDEpSjB9xWv/kXwYF6u1Z34sXJBSP0ZEtqi3iZ0mV0CS8YOl6lP5TA== X-Google-Smtp-Source: AGHT+IHiAacMTwUpsRWLWHtp7coc3+EfBMqKVHrPvZByNb8n3y8WVL82wTTT6nzCr2HID9Sm7rUeYA== X-Received: by 2002:a17:902:dad1:b0:20b:c17f:9dad with SMTP id d9443c01a7336-2129f75b590mr118058245ad.53.1732427924987; Sat, 23 Nov 2024 21:58:44 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:9db4:d34c:247c:f36b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2129db8d449sm41166995ad.28.2024.11.23.21.58.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Nov 2024 21:58:43 -0800 (PST) In-Reply-To: <865xofnyyk.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295887 Archived-At: > On Nov 22, 2024, at 6:08=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Vincenzo Pupillo >> Date: Fri, 22 Nov 2024 14:35:50 +0100 >>=20 >> Ciao, >> I am writing a treesitter-based version of mhtml (email threads = https:// >> lists.gnu.org/archive/html/emacs-devel/2024-11/msg00079.html).=20 >> I started from what I did for php-ts-mode.=20 >> In php-ts-mode the variable treesit-defun-prefer-top-level is = initialized to=20 >> t.=20 >> This variable, whose use I had borrowed from c-ts-mode, no longer = exists. >>> =46rom the Changelog.4 : =20 >> 2022-12-19 Stefan Kangas >>=20 >> Merge from origin/emacs-29 >>=20 >> 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 >>=20 >> This variable is also used by other major modes, with different = value: >>=20 >> lisp/progmodes/c-ts-mode.el >> 1259: (setq-local treesit-defun-prefer-top-level t) >>=20 >> lisp/progmodes/typescript-ts-mode.el >> 465: (setq-local treesit-defun-prefer-top-level t) >>=20 >> lisp/progmodes/ruby-ts-mode.el >> 1202: (setq-local treesit-defun-prefer-top-level nil) >>=20 >> lisp/progmodes/js.el >> 3919: (setq-local treesit-defun-prefer-top-level t) >>=20 >> treesit-defun-prefer-top-level should have been replaced by = treesit-defun- >> tactic which, however, is initialized by default with a value that = should=20 >> match only (setq treesit-defun-prefer-top-level nil).=20 Ohhh, yes. That=E2=80=99s my bad, I should=E2=80=99ve scanned for this = variable and remove them. Fortunately, just setting this variable = doesn=E2=80=99t do any harm. Also, IIRC, this variable lived and died = before we released Emacs 29, so there=E2=80=99s no = backward-compatibility breakage. For context, treesit-defun-prefer-top-level was replaced by = treesit-defun-tactic. treesit-defun-tactic is supposed to be set by the = user. So major mode don=E2=80=99t need to worry about it, unless they = want to. TBH major modes didn=E2=80=99t need to set = treesit-defun-prefer-top-level either, people probably copied it from = c-ts-mode, which do need to set it. >>=20 >> Is it possible that this is related to problems similar to those = indicated in=20 >> bug#73404? Not quite, that one is about sexp navigation, which this variable = doesn=E2=80=99t affect. Plus this variable isn=E2=80=99t used now = anyway. >=20 > 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. Yuan=