[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 2ef6992 278/352: Fixed import export etc indent
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 2ef6992 278/352: Fixed import export etc indentation at start of buffer. (#47) |
Date: |
Sun, 29 Aug 2021 11:23:01 -0400 (EDT) |
branch: elpa/julia-mode
commit 2ef6992125a85674532a1e37dacd5c60bee4feeb
Author: Tamas K. Papp <tkpapp@gmail.com>
Commit: Yichao Yu <yyc1992@gmail.com>
Fixed import export etc indentation at start of buffer. (#47)
Previously julia-mode would indent these keywords at the start of the
buffer, because the code had an error (point can never go below
point-min, which is at least 1). Fixed this, fixed tests (which
started with a blank line so did not catch this).
---
julia-mode-tests.el | 12 ++++--------
julia-mode.el | 2 +-
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/julia-mode-tests.el b/julia-mode-tests.el
index 1965fc8..be3856a 100644
--- a/julia-mode-tests.el
+++ b/julia-mode-tests.el
@@ -342,20 +342,16 @@ end"))
(ert-deftest julia--test-indent-import-export-using ()
"Toplevel using, export, and import."
(julia--should-indent
- "
-export bar, baz,
+ "export bar, baz,
quux"
- "
-export bar, baz,
+ "export bar, baz,
quux")
(julia--should-indent
- "
-using Foo: bar ,
+ "using Foo: bar ,
baz,
quux
notpartofit"
- "
-using Foo: bar ,
+ "using Foo: bar ,
baz,
quux
notpartofit"))
diff --git a/julia-mode.el b/julia-mode.el
index 271f500..dba9e38 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -437,7 +437,7 @@ symbol, gives up when this is not true."
(module nil)) ; found "Module:"
(save-excursion
(beginning-of-line)
- (while (and (not done) (< 0 (point)))
+ (while (and (not done) (< (point-min) (point)))
(julia-safe-backward-sexp)
(cond
((looking-at (rx (or "import" "export" "using")))
- [nongnu] elpa/julia-mode 7802452 263/352: Merge pull request #35 from tpapp/fix-10, (continued)
- [nongnu] elpa/julia-mode 7802452 263/352: Merge pull request #35 from tpapp/fix-10, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9c36479 264/352: Merge pull request #36 from JuliaEditorSupport/jb/typekeywords, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode feb6e79 259/352: Merge pull request #31 from RalphAS/custom-lookback, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b24410f 279/352: Allow user to set multiple arguments to inferior julia, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 04b97c4 269/352: Merge pull request #37 from tpapp/fix-backslash, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 1f254f8 260/352: Fix indentation for anonymous functions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 5812bc3 261/352: Added tests for parentheses following keywords., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b99710c 251/352: `python-mode`-like paren-indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 483805b 257/352: Merge pull request #29 from nverno/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9f990bb 281/352: Handle string escapes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 2ef6992 278/352: Fixed import export etc indentation at start of buffer. (#47),
ELPA Syncer <=
- [nongnu] elpa/julia-mode 117b791 294/352: Replace `Associative` by `AbstractDict` (thanks to @tpapp), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode dc21978 289/352: Merge pull request #63 from nverno/movement-functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 61e22f6 312/352: Merge pull request #90 from tpapp/tp/add-melpa-badge, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a174d0e 315/352: Fix indentation of generated elisp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 97325c4 318/352: Merge pull request #87 from tpapp/tp/drop-emacs-23, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 0eec10a 333/352: Do not consider `:end` as block ending, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c9d8230 329/352: Give \ punctuation syntax outside of strings (#113), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6b7e956 321/352: Fix for derived parent mode (#66), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9dcabbc 334/352: Simplify the logic to find the end of last block, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 796ddfd 338/352: Apply proper syntax to triple-quoted cmds, ELPA Syncer, 2021/08/29