emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/julia-mode e7c8550 228/352: Bind indent offset to its stan


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode e7c8550 228/352: Bind indent offset to its standard value for tests
Date: Sun, 29 Aug 2021 11:22:50 -0400 (EDT)

branch: elpa/julia-mode
commit e7c85504daf3b681ee5093802f103f1baf20b113
Author: Marten Lienen <marten.lienen@gmail.com>
Commit: Yichao Yu <yyc1992@gmail.com>

    Bind indent offset to its standard value for tests
---
 julia-mode.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index 5ebc587..0c30e25 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -465,11 +465,12 @@ with it. Returns nil if we're not within nested parens."
 (defmacro julia--should-indent (from to)
   "Assert that we indent text FROM producing text TO in `julia-mode'."
   `(with-temp-buffer
-     (julia-mode)
-     (insert ,from)
-     (indent-region (point-min) (point-max))
-     (should (equal (buffer-substring-no-properties (point-min) (point-max))
-                    ,to))))
+     (let ((julia-indent-offset 4))
+       (julia-mode)
+       (insert ,from)
+       (indent-region (point-min) (point-max))
+       (should (equal (buffer-substring-no-properties (point-min) (point-max))
+                      ,to)))))
 
 ;; Emacs 23.X doesn't include ert, so we ignore any errors that occur
 ;; when we define tests.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]