From unknown Tue Aug 19 21:04:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63110 <63110@debbugs.gnu.org> To: bug#63110 <63110@debbugs.gnu.org> Subject: Status: 30.0.50; [PATCH] Improve call indentation for elixir-ts-mode Reply-To: bug#63110 <63110@debbugs.gnu.org> Date: Wed, 20 Aug 2025 04:04:12 +0000 retitle 63110 30.0.50; [PATCH] Improve call indentation for elixir-ts-mode reassign 63110 emacs submitter 63110 Wilhelm Kirschbaum severity 63110 normal tag 63110 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 27 06:32:20 2023 Received: (at submit) by debbugs.gnu.org; 27 Apr 2023 10:32:20 +0000 Received: from localhost ([127.0.0.1]:57642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pryvE-0001WX-8u for submit@debbugs.gnu.org; Thu, 27 Apr 2023 06:32:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:54090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pryvB-0001WO-Be for submit@debbugs.gnu.org; Thu, 27 Apr 2023 06:32:18 -0400 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 1pryvB-0007nz-4g for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 06:32:17 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pryv9-0007wM-6c for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 06:32:16 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f1950f5628so69892215e9.3 for ; Thu, 27 Apr 2023 03:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682591533; x=1685183533; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=CK9Js0CUssWAKjCwynonHsTVE5hoWQSsmNdvBg2Dq8Q=; b=RJ11g3j/xTgq2h9vlDvejzrUpzjYQTwgKed78Cc9G+CsaHvoUxblCvlLmWrBKeVgrc I5oDQDKDzmFZECmrw1E99tx8oIZEBek//3bcsBPZB/V+kLMJsTZiAxSs+RQIcGjxTSYZ ABgvNZt3tmnxQSESwYdw/yIgTEMGumvb34nii70g9eQEVyQ3TeT7OU2mv/a2KHdrM88f awR2iTe9qhHWK+POgJobDB8zOXDOGhRYt/1fA8m9Du/IypVWy6p4kO+XsT3J9O0nuucA 5Eq/eDWBdvfLjBISnwXUWon7b6EBYp/2tnPu9z8hUO1b/QIgfvhtM4d0ltuqy3ADek7j rkdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682591533; x=1685183533; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CK9Js0CUssWAKjCwynonHsTVE5hoWQSsmNdvBg2Dq8Q=; b=Dk3m92RrTHeMxiB+GvqYoHYPg3Fnjya2AkI6SpRpurLEBkr5u33SITRS9Vkqkoizt3 0S86GTCy72aIbqBiVqXN7JIb7+IwNArVCdGhB4RQRBcsM9J8X20+AqYb97jep3zEU8PL NJvr3f7lZ4jZLtufYxCRtWPBXbRrEpul9Z+sgWPfWESOjUM+5mjpc/PiinAjs9vAU1Zr xp6sKPRvvOOHc7FkbBDzQn9a5U5toJBs/ftS8aOjK5cr25becEx6qh0bn4+9DiHIMNqh hwLF43z7x+O1yJom1dK5jDPk2WMpVrilCpU82QN7RnAUhWxdflmJbwNeWURuD/LJw7G0 pmsQ== X-Gm-Message-State: AC+VfDxLoXfm4UW3sHMnrZlfVv6d9ZizM2RW6ClL465aM3b/lJ+jxamw JH1UMVxP8rbwNTLQ7au3NuvVYFpVM9jGnA== X-Google-Smtp-Source: ACHHUZ4lEhGUgk9WOkj2gv0+S5fESh/ADTyRTWlFK2IZvkFvyJtgA1STYrlSiXFb4dsPQkO1FVQiWA== X-Received: by 2002:a05:600c:281:b0:3f0:9fef:1028 with SMTP id 1-20020a05600c028100b003f09fef1028mr978754wmk.17.1682591533229; Thu, 27 Apr 2023 03:32:13 -0700 (PDT) Received: from melissa.local ([2c0f:ef18:1431:0:b09:9616:db04:c248]) by smtp.gmail.com with ESMTPSA id k25-20020a05600c081900b003f17122587bsm24171825wmp.36.2023.04.27.03.32.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 03:32:12 -0700 (PDT) User-agent: mu4e 1.9.3; emacs 30.0.50 From: Wilhelm Kirschbaum To: bug-gnu-emacs@gnu.org Subject: 30.0.50; [PATCH] Improve call indentation for elixir-ts-mode Date: Thu, 27 Apr 2023 12:29:58 +0200 Message-ID: <87354ly5sm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=wkirschbaum@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; format=flowed Improves indentation for call's when the first argument is on the same line as the call itself. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Improve-call-indentation-for-elixir-ts-mode.patch Content-Description: Improve call indentation for elixir-ts-mode >From 3a03e1ba99d8d28b302f0130f07bed17ae2a0d06 Mon Sep 17 00:00:00 2001 From: Wilhelm H Kirschbaum Date: Thu, 27 Apr 2023 12:13:25 +0200 Subject: [PATCH] Improve call indentation for elixir-ts-mode * lisp/progmodes/elixir-ts-mode.el (elixir-ts--indent-rules): Change match order. * test/lisp/progmodes/elixir-ts-mode-resources/indent.erts: Add test case. --- lisp/progmodes/elixir-ts-mode.el | 2 +- .../progmodes/elixir-ts-mode-resources/indent.erts | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index 47f53043af3..7175fe4bff8 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -257,7 +257,6 @@ elixir-ts--indent-rules ((node-is "^stab_clause$") parent-bol ,offset) ((query ,elixir-ts--capture-operator-parent) grand-parent 0) ((node-is "^when$") parent 0) - ((node-is "^keywords$") parent-bol ,offset) ((parent-is "^body$") (lambda (node parent _) (save-excursion @@ -272,6 +271,7 @@ elixir-ts--indent-rules ,'elixir-ts--argument-indent-anchor ,'elixir-ts--argument-indent-offset) ;; Handle incomplete maps when parent is ERROR. + ((node-is "^keywords$") parent-bol ,offset) ((n-p-gp "^binary_operator$" "ERROR" nil) parent-bol 0) ;; When there is an ERROR, just indent to prev-line. ((parent-is "ERROR") prev-line ,offset) diff --git a/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts b/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts index 4eb6e768b96..1f855d3c977 100644 --- a/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts @@ -193,7 +193,19 @@ tuple = { } =-=-= -Name: Spec and method +Name: Call with keywords + +=-= +def foo() do + bar(:one, + :two, + one: 1, + two: 2 + ) +end +=-=-= + +Name: Call with @spec =-= @spec foobar( -- 2.40.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 29 05:17:33 2023 Received: (at 63110-done) by debbugs.gnu.org; 29 Apr 2023 09:17:33 +0000 Received: from localhost ([127.0.0.1]:35261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psghx-0004d7-1C for submit@debbugs.gnu.org; Sat, 29 Apr 2023 05:17:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psghv-0004cs-KT for 63110-done@debbugs.gnu.org; Sat, 29 Apr 2023 05:17:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psghq-0001zC-8e; Sat, 29 Apr 2023 05:17:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oc6af+srsDsjJ/IKR0bI+3BmGzc1uhw/T5vdEwzfQd0=; b=lQGLLzWD+TN7 lcg5pMGA6e8QmOlF3fN+xdNZlePaBIZZXo+AYLsFV2Z/xxXD/GaazzK73ZRrA4uMLf8EVjDH1F3k8 wIT1DZDwLe86NYpFPy/2vSb4be+r3MXZYQ2nB5GAfVOXvWR1DA14FYbJYxcFSD0w059KNLr9GKqXx tThxM+aFwJL9po63tLqt5y/wHJkdhecZjHQRzxfCnjVEjQa6NN2Cah13J3t+6gd43uJf+PnTbEFuL mBmWzqmSITvI7NjL5D3+uQmyq8I6zmZC7bQLDTiUsZzphqPAXx9wyKLgwTnkSRSkvhdu1UVJwk3iU I0toibLrbY5by4S7mdsVpQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psghe-0000FP-ON; Sat, 29 Apr 2023 05:17:25 -0400 Date: Sat, 29 Apr 2023 12:17:51 +0300 Message-Id: <831qk3qc74.fsf@gnu.org> From: Eli Zaretskii To: Wilhelm Kirschbaum In-Reply-To: <87354ly5sm.fsf@gmail.com> (message from Wilhelm Kirschbaum on Thu, 27 Apr 2023 12:29:58 +0200) Subject: Re: bug#63110: 30.0.50; [PATCH] Improve call indentation for elixir-ts-mode References: <87354ly5sm.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63110-done Cc: 63110-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Wilhelm Kirschbaum > Date: Thu, 27 Apr 2023 12:29:58 +0200 > > Improves indentation for call's when the first argument is on the > same line as the call itself. Thanks, installed. Closing the bug. From unknown Tue Aug 19 21:04:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 27 May 2023 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator