Skip to content

Commit

Permalink
Multiline comments with leading *s line up the *s
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahChalmer committed Aug 30, 2013
1 parent 0b9dc80 commit 70bc163
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/etc/emacs/rust-mode.el
Expand Up @@ -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,
Expand Down

0 comments on commit 70bc163

Please sign in to comment.