mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-07 22:32:08 -08:00
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:
parent
e989ab4920
commit
0ceefc7fe2
2 changed files with 1 additions and 11 deletions
|
|
@ -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 " "))))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue