Skip to content

Commit a489024

Browse files
committed
indent-new-comment-line: Inherit slashes from the previous line
1 parent 42669da commit a489024

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

swift-mode-indent.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,10 @@ See `indent-new-comment-line' for SOFT."
14551455
(insert-before-markers-and-inherit
14561456
(cond
14571457
(is-single-line-comment
1458-
"// ")
1458+
(save-excursion
1459+
(goto-char comment-beginning-position)
1460+
(looking-at "/+")
1461+
(concat (match-string-no-properties 0) space-after-asterisk)))
14591462

14601463
(comment-multi-line
14611464
(save-excursion

0 commit comments

Comments
 (0)