Skip to content

Commit f292554

Browse files
committed
Changed rust-mode code for tabs -> spaces
1 parent 2a81393 commit f292554

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

rust-mode.el

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@
7373
;; open bracket ends the line
7474
(when (not (looking-at "[[:blank:]]*\\(?://.*\\)?$"))
7575
(when (looking-at "[[:space:]]")
76-
(forward-word 1)
77-
(backward-word 1))
76+
(forward-word 1)
77+
(backward-word 1))
7878
(current-column))))
7979

8080
(defun rust-align-to-method-chain ()
8181
(save-excursion
82-
(previous-line)
83-
(end-of-line)
84-
(backward-word 1)
85-
(backward-char)
86-
(when (looking-at "\\..+\(.*\)\n")
87-
(- (current-column) rust-indent-offset))))
82+
(previous-line)
83+
(end-of-line)
84+
(backward-word 1)
85+
(backward-char)
86+
(when (looking-at "\\..+\(.*\)\n")
87+
(- (current-column) rust-indent-offset))))
8888

8989
(defun rust-rewind-to-beginning-of-current-level-expr ()
9090
(let ((current-level (rust-paren-level)))
@@ -108,9 +108,9 @@
108108
;; the inside of it correctly relative to the outside.
109109
(if (= 0 level)
110110
0
111-
(or
112-
(when rust-indent-method-chain
113-
(rust-align-to-method-chain))
111+
(or
112+
(when rust-indent-method-chain
113+
(rust-align-to-method-chain))
114114
(save-excursion
115115
(backward-up-list)
116116
(rust-rewind-to-beginning-of-current-level-expr)
@@ -126,16 +126,16 @@
126126
;; A closing brace is 1 level unindended
127127
((looking-at "}") (- baseline rust-indent-offset))
128128

129-
;;Line up method chains by their .'s
130-
((when (and rust-indent-method-chain
131-
(looking-at "\..+\(.*\);?\n"))
132-
(or
133-
(let ((method-indent (rust-align-to-method-chain)))
134-
(when method-indent
135-
(+ method-indent rust-indent-offset)))
136-
(+ baseline rust-indent-offset))))
129+
;;Line up method chains by their .'s
130+
((when (and rust-indent-method-chain
131+
(looking-at "\..+\(.*\);?\n"))
132+
(or
133+
(let ((method-indent (rust-align-to-method-chain)))
134+
(when method-indent
135+
(+ method-indent rust-indent-offset)))
136+
(+ baseline rust-indent-offset))))
137137

138-
138+
139139
;; Doc comments in /** style with leading * indent to line up the *s
140140
((and (nth 4 (syntax-ppss)) (looking-at "*"))
141141
(+ 1 baseline))

0 commit comments

Comments
 (0)