summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Chalmer <micah@micahchalmer.net>2013-08-30 16:58:43 -0400
committerMicah Chalmer <micah@micahchalmer.net>2013-09-05 22:18:29 -0400
commit0bf2920e1d3fc5cd5f14b4e89d2535c1a39315cd (patch)
tree8c376684c9a0d4e29e63e295213d21765d15b3d1
parent3301c707f32c48a75f970e1e9c21fa5d011cb50d (diff)
downloadrust-mode-0bf2920e1d3fc5cd5f14b4e89d2535c1a39315cd.tar.gz
Fix glitches with struct field aligned indents
-rw-r--r--rust-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 92b8524..e8cfd05 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -85,10 +85,10 @@
(not (looking-at "[[:space:]]*\\(?://.*\\)?$"))))
(+ 1 (current-column)))
;; Check for fields on the same line as the open curly brace:
- ((looking-at "{[[:blank:]]*[^}\n]*,[[:space:]]*$")
+ ((looking-at "{[[:space:]]*[^\n]*,[[:space:]]*$")
(progn
(forward-char)
- (forward-to-word 1)
+ (when (looking-at "[[:space:]]") (forward-to-word 1))
(current-column)))
(t (progn
(goto-char pt)