Skip to content

Commit e9e493e

Browse files
committed
Set comment-line-break-function
Emacs 27 bind M-j and C-M-j to `default-indent-new-line` which delegates to `comment-line-break-function`. Emacs 26 and earlier bind it to `indent-new-comment-line`.
1 parent ad12a30 commit e9e493e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

swift-mode.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ Signal `scan-error' if it hits opening parentheses."
192192
"\\s *"))
193193
(setq-local fill-indent-according-to-mode t)
194194
(setq-local comment-multi-line t)
195+
(setq-local comment-line-break-function #'swift-mode:indent-new-comment-line)
195196

196197
(setq-local parse-sexp-lookup-properties t)
197198
(add-hook 'syntax-propertize-extend-region-functions

0 commit comments

Comments
 (0)