emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 38dab12 063/486: Fix rust-align-to-expr-after-br


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 38dab12 063/486: Fix rust-align-to-expr-after-brace, closes #11239.
Date: Sat, 7 Aug 2021 09:24:49 -0400 (EDT)

branch: elpa/rust-mode
commit 38dab12b9008966a4cecf3a1a9494224a17c0432
Author: John Louis Walker <injyuw@gmail.com>
Commit: John Louis Walker <injyuw@gmail.com>

    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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]