fix(ocaml): don't prefix comment continuation lines with *

tuareg sets comment-continue to " * ", causing comment-indent-new-line
to insert ** on new lines inside comments. OCaml convention is to not
prefix continuation lines with *. Set comment-continue to nil instead.

The custom +ocaml/comment-indent-new-line wrapper is no longer needed.

Fix: #5194
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
kovan 2026-02-14 00:31:17 +01:00 committed by Henrik Lissner
parent e989ab4920
commit 0ceefc7fe2
2 changed files with 1 additions and 11 deletions

View file

@ -1,11 +1 @@
;;; lang/ocaml/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +ocaml/comment-indent-new-line (&optional _)
"Break line at point and indent, continuing comment if within one."
(interactive)
(comment-indent-new-line)
(when (eq (char-before) ?*)
(just-one-space))
(unless (eq (char-after) 32)
(save-excursion (insert " "))))

View file

@ -28,7 +28,7 @@
(setq tuareg-prettify-symbols-full t)
(setq-hook! 'tuareg-mode-hook
comment-line-break-function #'+ocaml/comment-indent-new-line)
comment-continue nil)
(map! :localleader
:map tuareg-mode-map