[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 8818ede 245/352: fix ignoring of keywords insid
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 8818ede 245/352: fix ignoring of keywords inside comments |
Date: |
Sun, 29 Aug 2021 11:22:54 -0400 (EDT) |
branch: elpa/julia-mode
commit 8818ede7e1bb7d7ab6ce4b5fca6d3c235e21293e
Author: Jeff Bezanson <jeff.bezanson@gmail.com>
Commit: Jeff Bezanson <jeff.bezanson@gmail.com>
fix ignoring of keywords inside comments
This was part of the fix for
https://github.com/JuliaLang/julia/issues/15461, but I just noticed that it
doesn't work due to a mis-nesting of this one clause.
also adds a test for this
---
julia-mode-tests.el | 8 ++++++++
julia-mode.el | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/julia-mode-tests.el b/julia-mode-tests.el
index bd57f17..647323b 100644
--- a/julia-mode-tests.el
+++ b/julia-mode-tests.el
@@ -284,6 +284,14 @@ end"
end
end"))
+(ert-deftest julia--test-indent-after-commented-keyword ()
+ "Ignore keywords in comments when indenting."
+ (julia--should-indent
+ "# if foo
+a = 1"
+ "# if foo
+a = 1"))
+
(defun julia--run-tests ()
(interactive)
(if (featurep 'ert)
diff --git a/julia-mode.el b/julia-mode.el
index 4e41075..e9a2c0c 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -408,8 +408,8 @@ a keyword if used as a field name, X.word, or quoted,
:word."
(member (current-word t) kw-list)
;; 'end' is not a keyword when used for indexing, e.g. foo[end-2]
(or (not (equal (current-word t) "end"))
- (not (julia-in-brackets))
- (not (julia-in-comment)))))
+ (not (julia-in-brackets)))
+ (not (julia-in-comment))))
;; if backward-sexp gives an error, move back 1 char to move over the '('
(defun julia-safe-backward-sexp ()
- [nongnu] elpa/julia-mode 8dd023d 223/352: julia-paren-indent: docstring, test, (continued)
- [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, 2021/08/29
- [nongnu] elpa/julia-mode 8818ede 245/352: fix ignoring of keywords inside comments,
ELPA Syncer <=
- [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
- [nongnu] elpa/julia-mode e22219f 266/352: Added another test., ELPA Syncer, 2021/08/29