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

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

[nongnu] elpa/rust-mode fe55b71 046/486: Multiline comments with leading


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode fe55b71 046/486: Multiline comments with leading *s line up the *s
Date: Sat, 7 Aug 2021 09:24:45 -0400 (EDT)

branch: elpa/rust-mode
commit fe55b710f6cadaaab64aa58a5a4c19b2c5a90736
Author: Micah Chalmer <micah@micahchalmer.net>
Commit: Micah Chalmer <micah@micahchalmer.net>

    Multiline comments with leading *s line up the *s
---
 rust-mode.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rust-mode.el b/rust-mode.el
index 8cf6c45..5c94f6f 100644
--- a/rust-mode.el
+++ b/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,



reply via email to

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