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

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

[nongnu] elpa/julia-mode 8ab2a60 222/352: julia-paren-indent skips blank


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode 8ab2a60 222/352: julia-paren-indent skips blanks after paren
Date: Sun, 29 Aug 2021 11:22:49 -0400 (EDT)

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

    julia-paren-indent skips blanks after paren
---
 julia-mode.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index 31c2df8..8ff40d1 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -356,8 +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 innermost containing paren
-before point. Returns nil if we're not within nested parens."
+  "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."
   (save-excursion
     (let ((min-pos (max (- (point) julia-max-paren-lookback)
                         (point-min)))
@@ -375,7 +376,10 @@ before point. Returns nil if we're not within nested 
parens."
         (julia--safe-backward-char))
 
       (if (plusp open-count)
-          (+ (current-column) 2)
+          (progn (forward-char 2)
+                 (while (looking-at (rx blank))
+                   (forward-char))
+                 (current-column))
         nil))))
 
 (defun julia-indent-line ()



reply via email to

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