Subject: bug#77102: [PATCH] ; Fix 'lua-ts-mode' tests

From: john muhl <[email-masked]>
Date: Tue, 18 Mar 2025 09:18:56 -0500

>From 68ddcf9addbbd14375deaa08fd91d316b8f8c8ed Mon Sep 17 00:00:00 2001
From: john muhl <[email-masked]>
Date: Tue, 18 Mar 2025 09:12:39 -0500
Subject: [PATCH] ; Fix 'lua-ts-mode' tests (Bug#77102)

* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Remove unintended use of tabs and make indentation settings
buffer local.
---
 .../lua-ts-mode-resources/indent.erts          | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
index 575e0e2cbf0..408cd5d115c 100644
--- a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
@@ -1,8 +1,8 @@
 Code:
   (lambda ()
-    (setq lua-ts-indent-offset 2)
-    (setq indent-tabs-mode nil)
     (lua-ts-mode)
+    (setq-local indent-tabs-mode nil)
+    (setq-local lua-ts-indent-offset 2)
     (indent-region (point-min) (point-max)))
 
 Name: Chunk Indent
@@ -479,8 +479,8 @@ local tb9 = { one = 1,
    two = 2 }
 =-=
 local tb9 = { one = 1,
-	      -- comment
-	      two = 2 }
+              -- comment
+              two = 2 }
 =-=-=
 
 Name: Argument Indent 1
@@ -805,9 +805,9 @@ end
 
 Code:
   (lambda ()
-    (setq lua-ts-indent-offset 4)
     (lua-ts-mode)
-    (setq indent-tabs-mode nil)
+    (setq-local lua-ts-indent-offset 4)
+    (setq-local indent-tabs-mode nil)
     (indent-region (point-min) (point-max)))
 
 Name: End Indent 1
@@ -1072,10 +1072,10 @@ end end end
 
 Code:
   (lambda ()
-    (setq lua-ts-indent-continuation-lines nil)
-    (setq lua-ts-indent-offset 2)
     (lua-ts-mode)
-    (setq indent-tabs-mode nil)
+    (setq-local lua-ts-indent-continuation-lines nil)
+    (setq-local lua-ts-indent-offset 2)
+    (setq-local indent-tabs-mode nil)
     (indent-region (point-min) (point-max)))
 
 Name: Unaligned Continuation Indent
-- 
2.48.1

john muhl <[email-masked]> writes:

> Tags: patch
>
> This removes some tabs that snuck into the tests during the
> previous patch and makes indentation settings buffer local.