From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59617: 29.0.50; Add indent styles to all tree-sitter modes Date: Wed, 30 Nov 2022 23:24:18 +0100 Message-ID: <9B669C4C-9CC7-4706-A801-8049E4141C3A@thornhill.no> References: Reply-To: Theodor Thornhill Mime-Version: 1.0 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="29326"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59617@debbugs.gnu.org To: Yuan Fu , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 23:25:32 2022 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 1p0VWF-0007Nl-4G for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 23:25:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0VW4-0002ME-Vy; Wed, 30 Nov 2022 17:25:21 -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 1p0VVp-0002Go-KU for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 17:25:11 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0VVm-0005Av-OE for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 17:25:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0VVm-0004jk-6o for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 17:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2022 22:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59617 X-GNU-PR-Package: emacs Original-Received: via spool by 59617-submit@debbugs.gnu.org id=B59617.166984709918199 (code B ref 59617); Wed, 30 Nov 2022 22:25:02 +0000 Original-Received: (at 59617) by debbugs.gnu.org; 30 Nov 2022 22:24:59 +0000 Original-Received: from localhost ([127.0.0.1]:35466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0VVi-0004jT-QW for submit@debbugs.gnu.org; Wed, 30 Nov 2022 17:24:59 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]:47691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0VVd-0004jN-7W for 59617@debbugs.gnu.org; Wed, 30 Nov 2022 17:24:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1669847091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D7hzlwyOuWSpenXxgCN1gXdyEcxOLw8GR/gNO8oJL4o=; b=TOHg+TzMu7MIKOVAw/WRR6Wj3dq6PchjJydUa/ipC8dUEEvPVImo0v8ED1s8DG2z8jbAsj rBFH6MO7uvGVdgGiogpe2Glj7NKOyq4xZPe3sbtApirqRvcs4gdwo4+zxg2BepNCwH9HRi M0FsI7PR6GkdykGbdROPRIZBp18fkod7ViDEcG3D1du2p5U1cKtny2Bwp7tFWKRCpxfIY2 jESF8IlY7fpOfDCje6849mBVx99Zqa8xo+xhP72ZBHR1yH12PPZTte1ilyIyJT4C9Lzuz9 e+Z22vuF24m1QQ19c2GNkt1CCLTihfBNemP2Z0SPnfNbnkG3doqHiU+TSRKpUA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: X-Migadu-Flow: FLOW_OUT 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:249578 Archived-At: On 30 November 2022 22:44:39 CET, Yuan Fu wrote: > >Eli Zaretskii writes: > >>> From: Theodor Thornhill >>> Cc: casouri@gmail=2Ecom, 59617@debbugs=2Egnu=2Eorg >>> Date: Tue, 29 Nov 2022 16:19:26 +0100 >>>=20 >>> Theodor Thornhill writes: >>>=20 >>> > Rebased on emacs-29=2E >>> > >>>=20 >>> Is this good to go or should I change something here? >> >> Good to go from my POV, but I wanted also to hear from Yuan=2E >> >> Thanks=2E > >Hey sorry, I was busy with some other things=2E I=E2=80=99ve looked at th= e patch, >it seems adding a hook that sets treesit-simple-indent-rules would have >the same effect, no? (Ie, user already can set a custom indent style) >Like instead of > >(defvar my-personal-csharp-mode-indent-rules (=2E=2E=2E)) > >(setq csharp-ts-mode-indent-style > (lambda () my-personal-csharp-mode-indent-rules)) > >you can just do > >(defvar my-personal-csharp-mode-indent-rules (=2E=2E=2E)) > >(add-hook 'csharp-mode-hook > (lambda () > (setq treesit-simple-indent-rules > my-personal-csharp-mode-indent-rules))) > >This way there is no need to define a custom option and a function for >each mode=2E And users can use the same variable >treesit-simple-indent-rules, just in different major mode hooks=2E > >Yuan Hmm I think you're right, and I think I agree :) Theo