We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c6c751 commit 20def31Copy full SHA for 20def31
src/etc/emacs/rust-mode.el
@@ -62,7 +62,8 @@
62
;; - { means indent to either nesting-level * rust-indent-offset,
63
;; or one further indent from that if either current line
64
;; begins with 'else', or previous line didn't end in
65
- ;; semi, comma or brace, and wasn't an attribute. PHEW.
+ ;; semi, comma or brace (other than whitespace and line
66
+ ;; comments) , and wasn't an attribute. PHEW.
67
((> level 0)
68
(let ((pt (point)))
69
(rust-rewind-irrelevant)
@@ -79,7 +80,7 @@
79
80
(beginning-of-line)
81
82
(end-of-line)
- (if (looking-back "[{};,]")
83
+ (if (looking-back "[,;{}][[:space:]]*\\(?://.*\\)?")
84
(* rust-indent-offset level)
85
(back-to-indentation)
86
(if (looking-at "#")
0 commit comments