]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix 'lua-ts-mode' tests (Bug#77102)
authorjohn muhl <jm@pub.pink>
Tue, 18 Mar 2025 14:12:39 +0000 (09:12 -0500)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Mar 2025 18:15:18 +0000 (19:15 +0100)
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Remove unintended use of tabs and make indentation settings
buffer local.

(cherry picked from commit 60e9195984d746cbbb5939918ed5ddc27377c0e6)

test/lisp/progmodes/lua-ts-mode-resources/indent.erts

index 575e0e2cbf05caf61f1fb1e359cf2180b4db02fa..408cd5d115c31daf33837c0c5b6d4c6b4a6be7e9 100644 (file)
@@ -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