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

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

[nongnu] elpa/rust-mode f292554 097/486: Changed rust-mode code for tabs


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode f292554 097/486: Changed rust-mode code for tabs -> spaces
Date: Sat, 7 Aug 2021 09:24:56 -0400 (EDT)

branch: elpa/rust-mode
commit f292554261eeb6cd6134864c5f36e70a2b272f12
Author: Daniel Raloff <draloff@side2.com>
Commit: Daniel Raloff <draloff@side2.com>

    Changed rust-mode code for tabs -> spaces
---
 rust-mode.el | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/rust-mode.el b/rust-mode.el
index f66df6c..ed1523d 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -73,18 +73,18 @@
     ;; open bracket ends the line
     (when (not (looking-at "[[:blank:]]*\\(?://.*\\)?$"))
       (when (looking-at "[[:space:]]")
-       (forward-word 1)
-       (backward-word 1))
+    (forward-word 1)
+    (backward-word 1))
       (current-column))))
 
 (defun rust-align-to-method-chain ()
   (save-excursion
-       (previous-line)
-       (end-of-line)
-       (backward-word 1)
-       (backward-char)
-       (when (looking-at "\\..+\(.*\)\n")
-         (- (current-column) rust-indent-offset))))
+    (previous-line)
+    (end-of-line)
+    (backward-word 1)
+    (backward-char)
+    (when (looking-at "\\..+\(.*\)\n")
+      (- (current-column) rust-indent-offset))))
 
 (defun rust-rewind-to-beginning-of-current-level-expr ()
   (let ((current-level (rust-paren-level)))
@@ -108,9 +108,9 @@
                    ;; the inside of it correctly relative to the outside.
                    (if (= 0 level)
                        0
-                                        (or
-                                         (when rust-indent-method-chain
-                                               (rust-align-to-method-chain))
+                     (or
+                      (when rust-indent-method-chain
+                        (rust-align-to-method-chain))
                      (save-excursion
                        (backward-up-list)
                        (rust-rewind-to-beginning-of-current-level-expr)
@@ -126,16 +126,16 @@
               ;; A closing brace is 1 level unindended
               ((looking-at "}") (- baseline rust-indent-offset))
 
-                         ;;Line up method chains by their .'s
-                         ((when (and rust-indent-method-chain
-                                                 (looking-at "\..+\(.*\);?\n"))
-                                (or
-                                 (let ((method-indent 
(rust-align-to-method-chain)))
-                                       (when method-indent
-                                         (+ method-indent rust-indent-offset)))
-                                 (+ baseline rust-indent-offset))))
+              ;;Line up method chains by their .'s
+              ((when (and rust-indent-method-chain
+                          (looking-at "\..+\(.*\);?\n"))
+                 (or
+                  (let ((method-indent (rust-align-to-method-chain)))
+                    (when method-indent
+                      (+ method-indent rust-indent-offset)))
+                  (+ baseline rust-indent-offset))))
 
-                         
+              
               ;; Doc comments in /** style with leading * indent to line up 
the *s
               ((and (nth 4 (syntax-ppss)) (looking-at "*"))
                (+ 1 baseline))



reply via email to

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