Function: git-commit-ensure-comment-gap

git-commit-ensure-comment-gap is a natively compiled function defined in git-commit.el.

Signature

(git-commit-ensure-comment-gap)

Documentation

Separate initial empty line from initial comment.

If the buffer begins with an empty line followed by a comment, insert an additional newline in between, so that once the users start typing, the input isn't tacked to the comment.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/git-commit.el
;;; Setup

(defun git-commit-ensure-comment-gap ()
  "Separate initial empty line from initial comment.
If the buffer begins with an empty line followed by a comment, insert
an additional newline in between, so that once the users start typing,
the input isn't tacked to the comment."
  (save-excursion
    (goto-char (point-min))
    (when (looking-at (format "\\`\n%s" comment-start))
      (open-line 1))))