Function: neocaml--comment-body-anchor

neocaml--comment-body-anchor is a natively compiled function defined in neocaml.el.

Signature

(neocaml--comment-body-anchor NODE PARENT BOL &rest _)

Documentation

Return the position of the comment body start.

Uses NODE if non-nil, otherwise PARENT (for continuation lines where NODE is nil). Used as an indentation anchor so that lines inside a multi-line comment align with the text after the opening delimiter.

Source Code

;; Defined in /nix/store/ahssdx4rwzyxhyhavpn0bkznk13xrggi-emacs-packages-deps/share/emacs/site-lisp/elpa/neocaml-20260907.2015/neocaml.el
(defun neocaml--comment-body-anchor (node parent _bol &rest _)
  "Return the position of the comment body start.
Uses NODE if non-nil, otherwise PARENT (for continuation lines
where NODE is nil).  Used as an indentation anchor so that lines
inside a multi-line comment align with the text after the opening
delimiter."
  (let ((comment (or node parent)))
    (save-excursion
      (goto-char (treesit-node-start comment))
      (if (looking-at "(\\*+[ \t]*")
          (goto-char (match-end 0))
        (forward-char))
      (point))))