From 8271ba8239ad63ec977358e88c9056845b059761 Mon Sep 17 00:00:00 2001 From: John Louis Walker Date: Tue, 31 Dec 2013 14:19:36 -0500 Subject: [PATCH] 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. --- src/etc/emacs/rust-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el index f30cfaf8d1504..bf5fec39f828d 100644 --- a/src/etc/emacs/rust-mode.el +++ b/src/etc/emacs/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 ()