Function: git-commit--goto-insert-position

git-commit--goto-insert-position is a natively compiled function defined in git-commit.el.

Signature

(git-commit--goto-insert-position BOUND)

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/git-commit.el
(defun git-commit--goto-insert-position (bound)
  (let ((match (point)))
    (cond ((re-search-backward (format "^%s -+ >8 -+" comment-start) nil t))
          ((and (eobp) (bolp))
           (forward-line -1)))
    (while (and (or (looking-at comment-start)
                    (looking-at "[\s\t]*$"))
                (or (not bound) (> (point) bound))
                (not (bobp)))
      (setq match (point))
      (forward-line -1))
    (goto-char match)))