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

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

[nongnu] elpa/julia-mode 307b42b 189/352: If the previous line has a tra


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode 307b42b 189/352: If the previous line has a trailing =, that should take precedence over blocks.
Date: Sun, 29 Aug 2021 11:22:42 -0400 (EDT)

branch: elpa/julia-mode
commit 307b42b2d274302a0091607a196bf978edd3ded6
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>

    If the previous line has a trailing =, that should take precedence over 
blocks.
---
 julia-mode.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index 0216279..afb18c8 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -364,13 +364,6 @@ before point. Returns nil if we're not within nested 
parens."
       (save-excursion
         (beginning-of-line)
         (ignore-errors (julia-paren-indent)))
-      ;; Indent according to how many nested blocks we are in.
-      (save-excursion
-        (beginning-of-line)
-        (forward-to-indentation 0)
-        (let ((endtok (julia-at-keyword julia-block-end-keywords)))
-          (ignore-errors (+ (julia-last-open-block (point-min))
-                            (if endtok (- julia-basic-offset) 0)))))
       ;; If the previous line ends in =, increase the indent.
       (ignore-errors ; if previous line is (point-min)
         (save-excursion
@@ -381,6 +374,13 @@ before point. Returns nil if we're not within nested 
parens."
                      (equal (char-after (point)) ?=)))
               (+ julia-basic-offset (current-indentation))
             nil)))
+      ;; Indent according to how many nested blocks we are in.
+      (save-excursion
+        (beginning-of-line)
+        (forward-to-indentation 0)
+        (let ((endtok (julia-at-keyword julia-block-end-keywords)))
+          (ignore-errors (+ (julia-last-open-block (point-min))
+                            (if endtok (- julia-basic-offset) 0)))))
       ;; Otherwise, use the same indentation as previous line.
       (save-excursion (forward-line -1)
                       (current-indentation))



reply via email to

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