branch: elpa/julia-mode commit 2ef6992125a85674532a1e37dacd5c60bee4feeb Author: Tamas K. Papp <tkp...@gmail.com> Commit: Yichao Yu <yyc1...@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")))