Skip to content

Commit 8271ba8

Browse files
author
John Louis Walker
committed
Fix rust-align-to-expr-after-brace, closes #11239.
forward-to-word is undefined, and so Emacs would throw errors in rust-align-to-expr-after-brace. This change yields the expected behavior discussed in the issue.
1 parent 5ff7b28 commit 8271ba8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/etc/emacs/rust-mode.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
;; We don't want to indent out to the open bracket if the
5555
;; open bracket ends the line
5656
(when (not (looking-at "[[:blank:]]*\\(?://.*\\)?$"))
57-
(when (looking-at "[[:space:]]") (forward-to-word 1))
57+
(when (looking-at "[[:space:]]")
58+
(forward-word 1)
59+
(backward-word 1))
5860
(current-column))))
5961

6062
(defun rust-mode-indent-line ()

0 commit comments

Comments
 (0)