summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/rust-mode.el b/rust-mode.el
index d857f25..6b09580 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -444,10 +444,11 @@ function or trait. When nil, where will be aligned with fn or trait."
(save-excursion
(rust-rewind-irrelevant)
- ;; Point is now at the end of the previous ine
+ ;; Point is now at the end of the previous line
(or
- ;; If we are at the first line, no indentation is needed, so stay at baseline...
- (= 1 (line-number-at-pos (point)))
+ ;; If we are at the start of the buffer, no
+ ;; indentation is needed, so stay at baseline...
+ (= (point) 1)
;; ..or if the previous line ends with any of these:
;; { ? : ( , ; [ }
;; then we are at the beginning of an expression, so stay on the baseline...