Subject: bug#67701: closed (Re: bug#67701: 29.1; [PATCH] rust-ts-mode: Add electric indentation chars)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 08 Dec 2023 19:42:03 +0000

Your bug report

#67701: 29.1; [PATCH] rust-ts-mode: Add electric indentation chars

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
67701: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67701
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#67701: 29.1; [PATCH] rust-ts-mode: Add electric indentation chars
From: Dmitry Gutov <[email-masked]>
To: Christophe TROESTLER <[email-masked]>, [email-masked]
Date: Fri, 8 Dec 2023 21:40:41 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 29.1

On 08/12/2023 00:16, Christophe TROESTLER wrote:
> 
> This is a patch against the emacs-29 branch to add more chars to the electric indentation for rust-ts-mode.
> 

Thanks, installed.

Subject: 29.1; [PATCH] rust-ts-mode: Add electric indentation chars
From: Christophe TROESTLER <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 7 Dec 2023 22:16:19 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

This is a patch against the emacs-29 branch to add more chars to the electric indentation for rust-ts-mode.

Best,
Christophe

From fd261c2157b2c85c9e1f902bb81d84f9cde78ea9 Mon Sep 17 00:00:00 2001
From: Christophe Troestler <[email-masked]>
Date: Thu, 7 Dec 2023 23:03:07 +0100
Subject: [PATCH] rust-ts-mode: Add electric indentation chars
Content-Type: text/plain; charset="utf-8"

---
 lisp/progmodes/rust-ts-mode.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el
index 8127aa956f4..cc803f5f91a 100644
--- a/lisp/progmodes/rust-ts-mode.el
+++ b/lisp/progmodes/rust-ts-mode.el
@@ -435,6 +435,10 @@ rust-ts-mode
     (setq-local indent-tabs-mode nil
                 treesit-simple-indent-rules rust-ts-mode--indent-rules)
 
+    ;; Electric
+    (setq-local electric-indent-chars
+                (append "{}():;,#" electric-indent-chars))
+
     ;; Navigation.
     (setq-local treesit-defun-type-regexp
                 (regexp-opt '("enum_item"
-- 
2.42.0