branch: elpa/rust-mode
commit 38dab12b9008966a4cecf3a1a9494224a17c0432
Author: John Louis Walker <[email protected]>
Commit: John Louis Walker <[email protected]>
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.
---
rust-mode.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/rust-mode.el b/rust-mode.el
index f30cfaf..bf5fec3 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -54,7 +54,9 @@
;; We don't want to indent out to the open bracket if the
;; open bracket ends the line
(when (not (looking-at "[[:blank:]]*\\(?://.*\\)?$"))
- (when (looking-at "[[:space:]]") (forward-to-word 1))
+ (when (looking-at "[[:space:]]")
+ (forward-word 1)
+ (backward-word 1))
(current-column))))
(defun rust-mode-indent-line ()