about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMicah Chalmer <micah@micahchalmer.net>2013-08-30 01:15:32 -0400
committerMicah Chalmer <micah@micahchalmer.net>2013-08-30 02:04:01 -0400
commit70bc1637b877f52f824b34bbfbf73936d52a628e (patch)
tree6940cf6fdd0f0fdced60b172090346f850f46b4f
parent0b9dc80d493cb911a2d9d4152433b5998a40d556 (diff)
downloadrust-70bc1637b877f52f824b34bbfbf73936d52a628e.tar.gz
rust-70bc1637b877f52f824b34bbfbf73936d52a628e.zip
Multiline comments with leading *s line up the *s
-rw-r--r--src/etc/emacs/rust-mode.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el
index 8cf6c455979..5c94f6f4c84 100644
--- a/src/etc/emacs/rust-mode.el
+++ b/src/etc/emacs/rust-mode.el
@@ -57,6 +57,10 @@
               ;; A closing brace is 1 level unindended
               ((looking-at "}") (* rust-indent-offset (- level 1)))
 
+              ; Doc comments in /** style with leading * indent to line up the *s
+              ((and (nth 4 (syntax-ppss)) (looking-at "*"))
+               (+ 1 (* rust-indent-offset level)))
+
               ;; If we're in any other token-tree / sexp, then:
               ;;  - [ or ( means line up with the opening token
               ;;  - { means indent to either nesting-level * rust-indent-offset,