branch: elpa/swift-mode
commit e9e493eb93e3ba41ce95886d1beb760a0062c574
Author: taku0 <[email protected]>
Commit: taku0 <[email protected]>
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`.
---
swift-mode.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/swift-mode.el b/swift-mode.el
index 5acdd29..d6c0d82 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -192,6 +192,7 @@ Signal `scan-error' if it hits opening parentheses."
"\\s *"))
(setq-local fill-indent-according-to-mode t)
(setq-local comment-multi-line t)
+ (setq-local comment-line-break-function #'swift-mode:indent-new-comment-line)
(setq-local parse-sexp-lookup-properties t)
(add-hook 'syntax-propertize-extend-region-functions