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

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

[nongnu] elpa/julia-mode 8dd023d 223/352: julia-paren-indent: docstring,


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode 8dd023d 223/352: julia-paren-indent: docstring, test
Date: Sun, 29 Aug 2021 11:22:49 -0400 (EDT)

branch: elpa/julia-mode
commit 8dd023d8cc1852649bfc15912b5a1ba612a559cc
Author: Dan Schmidt <dfan@dfan.org>
Commit: Yichao Yu <yyc1992@gmail.com>

    julia-paren-indent: docstring, test
---
 julia-mode.el | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index 8ff40d1..368b5ce 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -356,9 +356,9 @@ This variable has a moderate effect on indent performance 
if set too
 high.")
 
 (defun julia-paren-indent ()
-  "Return the column position of the first non-blank character
-after the innermost containing paren before point. Returns nil if
-we're not within nested parens."
+  "Return the column of the text following the innermost
+containing paren before point, so we can align succeeding code
+with it. Returns nil if we're not within nested parens."
   (save-excursion
     (let ((min-pos (max (- (point) julia-max-paren-lookback)
                         (point-min)))
@@ -513,7 +513,7 @@ end"
 end"))
 
   (ert-deftest julia--test-indent-paren ()
-    "We should indent to line up with open parens."
+    "We should indent to line up with the text after an open paren."
     (julia--should-indent
      "
 foobar(bar,
@@ -522,6 +522,17 @@ baz)"
 foobar(bar,
        baz)"))
 
+  (ert-deftest julia--test-indent-paren-space ()
+    "We should indent to line up with the text after an open
+paren, even if there are additional spaces."
+    (julia--should-indent
+     "
+foobar( bar,
+baz )"
+     "
+foobar( bar,
+        baz )"))
+
   (ert-deftest julia--test-indent-equals ()
     "We should increase indent on a trailing =."
     (julia--should-indent



reply via email to

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