From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: john muhl Newsgroups: gmane.emacs.bugs Subject: bug#70785: [PATCH] Improve indentation in 'lua-ts-mode' Date: Sun, 05 May 2024 07:54:04 -0500 Message-ID: <87zft4mnbn.fsf@pub.pink> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7033"; mail-complaints-to="usenet@ciao.gmane.io" To: 70785@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 05 14:55:03 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 1s3bOP-0001bV-Qk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 May 2024 14:55:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3bO5-0003xl-On; Sun, 05 May 2024 08:54:41 -0400 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 1s3bO2-0003xQ-Mi for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 08:54:38 -0400 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 1s3bO2-0002Zi-Ea for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 08:54:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3bOP-0004nO-Va for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 08:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 May 2024 12:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171491368518417 (code B ref -1); Sun, 05 May 2024 12:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 May 2024 12:54:45 +0000 Original-Received: from localhost ([127.0.0.1]:59584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3bO9-0004mx-6L for submit@debbugs.gnu.org; Sun, 05 May 2024 08:54:45 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:35856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3bO6-0004mr-Uh for submit@debbugs.gnu.org; Sun, 05 May 2024 08:54:43 -0400 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 1s3bNb-0003tA-Ca for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 08:54:11 -0400 Original-Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3bNY-0002XH-He for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 08:54:10 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 1506511400E0 for ; Sun, 5 May 2024 08:54:06 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 05 May 2024 08:54:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm3; t=1714913646; x=1715000046; bh=VEm8VP8+bbYqdvIKnDaU2aaYlEl+3Ht+ bWTe9okLp0M=; b=TBUAVMoEKeOWcT/s5lrQEdqxQ+KE4pWTHjuWbsSm+bEmd/SH /bVTknUDK5ZIEzm5DcboOLOHlprQX7vCAKi3VsvltmYiyCokPi4A6+aM0vUnmfeK Z2Nav6k+vGRXqKZ8hi0S3k5DywjyNOUgmUDlz7zPdO07vtfX2Y6VIK2vd5dnDp2A 77+kFQ73F04wMPgL5EN8GoNKq3ZmYruSCcUjUDD3BGTzWtxQy4addEmHm+VaGQHv hb2owvI411kqXo36Mg1C3BI4TyhzXyiwb77lBZsEfN8soo6JC9j34Cg6qMysAmE1 4N9fX+rTq+RVqFQSm9LkRaOHlnZuXzF3VnA2dQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1714913646; x=1715000046; bh=VEm8VP8+bbYqdvIKnDaU2aaYlEl+3Ht+bWT e9okLp0M=; b=YA3hA0Lf8OpUZDLNzL7CnTiBAMxHbcZuGvYeI94NtxyTkToxnrJ 53lQXI+wlyqBiXMczkk90cJZPJkt8V6hYM6czBnggsi3TxY2xwBpNW5ndXIIVYOl h9ju17YVfTDbpqMStBxPEt3xuZ7CwnLVJKvTjjV1Hz3tOUNVo+wrxIhOc3Vndkb3 tFQ11mHLru1CEyFXMTiT3ekgUzoByUuFR2L0/nuL7mtBHRsiSz9t8u2dH/M+8SLH Ctexdfn8uZUJ5bGWt1T6/WD6lncxKDlLBOUor/HHJUh4wQUS0ABzvD3FAtYVLFVE UrBq31JPMwbBxFZL4M/EAZ0nMv5Zg2UKFEA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvgedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttd dtnecuhfhrohhmpehjohhhnhcumhhuhhhluceojhhmsehpuhgsrdhpihhnkheqnecuggft rfgrthhtvghrnhepgefhudekueehudeugffhgfegfeevhfetjeehhfeuleffgfeguedtff dvteeutedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepjhhmsehpuhgsrdhpihhnkh X-ME-Proxy: Feedback-ID: i74194916:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 5 May 2024 08:54:05 -0400 (EDT) Received-SPF: pass client-ip=103.168.172.152; envelope-from=jm@pub.pink; helo=fhigh1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:284496 Archived-At: Tags: patch I was contacted off-list about a few tweaks to the indentation. They seemed fine so here they are. 1. Change it so that comments are ignored when indenting table fields and function arguments/parameters: -- before local mt = { -- the comment first = 1, second = 2, } -- after local mt = { -- the comment first = 1, second = 2, } 2. It also changes how tables are handled in function arguments: -- before fn(true, { x = 1, y = 0, }) -- after fn(true, { x = 1, y = 0, }) 3. And it changes how simple use of an anonymous function is indented: -- before fn(function() print'ok' end) -- after fn(function() print'ok' end) In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-05-02 built on localhost Repository revision: 962bb71b4a813eb9c3832494746695d32d6f9109 Repository branch: master System Description: Fedora Linux 39 (Thirty Nine) Configured using: 'configure --with-pgtk --prefix=/home/jm/.local'