[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 6add61b 254/352: fix indenting after commented
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 6add61b 254/352: fix indenting after commented `end` |
Date: |
Sun, 29 Aug 2021 11:22:56 -0400 (EDT) |
branch: elpa/julia-mode
commit 6add61baef6735d3084d6f1df8e5d21104e2a526
Author: Jeff Bezanson <jeff.bezanson@gmail.com>
Commit: Jeff Bezanson <jeff.bezanson@gmail.com>
fix indenting after commented `end`
this was broken for me by 0df9ca44c4ba888341801ea00bec6e83ab6b208b
---
julia-mode-tests.el | 14 ++++++++++++++
julia-mode.el | 3 ++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/julia-mode-tests.el b/julia-mode-tests.el
index 046c959..61d1d31 100644
--- a/julia-mode-tests.el
+++ b/julia-mode-tests.el
@@ -315,6 +315,20 @@ a = 1"
"# if foo
a = 1"))
+(ert-deftest julia--test-indent-after-commented-end ()
+ "Ignore `end` in comments when indenting."
+ (julia--should-indent
+ "if foo
+a = 1
+#end
+b = 1
+end"
+ "if foo
+ a = 1
+ #end
+ b = 1
+end"))
+
(ert-deftest julia--test-indent-import-export-using ()
"Toplevel using, export, and import."
(julia--should-indent
diff --git a/julia-mode.el b/julia-mode.el
index 97f91c2..09c302f 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -454,7 +454,8 @@ Do not move back beyond position MIN."
(setq count
(cond ((julia-at-keyword julia-block-start-keywords)
(+ count 1))
- ((equal (current-word t) "end")
+ ((and (equal (current-word t) "end")
+ (not (julia-in-comment)))
(- count 1))
(t count))))
(if (> count 0)
- [nongnu] elpa/julia-mode f3b490b 210/352: Added inferior-julia comint mode, (continued)
- [nongnu] elpa/julia-mode f3b490b 210/352: Added inferior-julia comint mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8dd023d 223/352: julia-paren-indent: docstring, test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8d6ea60 233/352: Fix #11549 (top level after paren-indented line), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9cbde7b 236/352: julia-mode: Move tests to new file and improve, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 1f06e85 234/352: Alias `run-julia` to `inferior-julia` in julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a82e629 239/352: julia-mode: Indent manually inside strings with \n, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 1746c4b 238/352: julia-mode: Improve paren indent perf, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 44c9959 241/352: julia-mode: Fix #15461, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4f56ded 258/352: make lookback distance customizable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 362be60 255/352: Merge pull request #26 from JeffBezanson/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6add61b 254/352: fix indenting after commented `end`,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 8818ede 245/352: fix ignoring of keywords inside comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9067194 268/352: Merge pull request #38 from Wilfred/patch-1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode edaaff2 276/352: Bin op chars (#44), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c20a4e5 300/352: generate new LaTeX substitutions using 1.3-pre., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b194039 302/352: Merge pull request #72 from FelipeLema/unicode-for-in, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode addd3d4 305/352: Merge pull request #81 from JuliaEditorSupport/tp/add-substitution-tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9df3a7e 307/352: fix variable renaming, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 1b8682b 308/352: fix travis setup, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 43cfc91 109/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7304a4a 166/352: rename None to Union(), and Nothing to Void. fixes #8423, ELPA Syncer, 2021/08/29