Skip to content

Commit

Permalink
Fix rust-align-to-expr-after-brace, closes #11239.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
John Louis Walker committed Dec 31, 2013
1 parent 5ff7b28 commit 8271ba8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/etc/emacs/rust-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down

5 comments on commit 8271ba8

@bors
Copy link
Contributor

@bors bors commented on 8271ba8 Jan 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at johnwalker@8271ba8

@bors
Copy link
Contributor

@bors bors commented on 8271ba8 Jan 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging johnwalker/rust/issue-11239 = 8271ba8 into auto

@bors
Copy link
Contributor

@bors bors commented on 8271ba8 Jan 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

johnwalker/rust/issue-11239 = 8271ba8 merged ok, testing candidate = 7fc4df3

@bors
Copy link
Contributor

@bors bors commented on 8271ba8 Jan 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 8271ba8 Jan 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 7fc4df3

Please sign in to comment.