summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Louis Walker <injyuw@gmail.com>2013-12-31 14:19:36 -0500
committerJohn Louis Walker <injyuw@gmail.com>2013-12-31 14:19:36 -0500
commit38dab12b9008966a4cecf3a1a9494224a17c0432 (patch)
treec4ae41c9f53862fd0fd9d59aa0067556cce9065a
parentd82b5a7f15695ec1228e45b55e0796b9e4e1afe7 (diff)
downloadrust-mode-38dab12b9008966a4cecf3a1a9494224a17c0432.tar.gz
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.
-rw-r--r--rust-mode.el4
1 files changed, 3 insertions, 1 deletions
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 ()