mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-19 18:34:08 +00:00
auto merge of #11244 : johnwalker/rust/issue-11239, r=brson
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 issue #11239 by handling the case when whitespace follows a left bracket.
This commit is contained in:
commit
7fc4df366f
@ -54,7 +54,9 @@
|
|||||||
;; We don't want to indent out to the open bracket if the
|
;; We don't want to indent out to the open bracket if the
|
||||||
;; open bracket ends the line
|
;; open bracket ends the line
|
||||||
(when (not (looking-at "[[:blank:]]*\\(?://.*\\)?$"))
|
(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))))
|
(current-column))))
|
||||||
|
|
||||||
(defun rust-mode-indent-line ()
|
(defun rust-mode-indent-line ()
|
||||||
|
Loading…
Reference in New Issue
Block a user