From 70bc1637b877f52f824b34bbfbf73936d52a628e Mon Sep 17 00:00:00 2001 From: Micah Chalmer Date: Fri, 30 Aug 2013 01:15:32 -0400 Subject: [PATCH] Multiline comments with leading *s line up the *s --- src/etc/emacs/rust-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el index 8cf6c45597946..5c94f6f4c84cd 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,