Function: c-ts-mode-indent-defun

c-ts-mode-indent-defun is an interactive and byte-compiled function defined in c-ts-mode.el.gz.

Signature

(c-ts-mode-indent-defun)

Documentation

Indent the current top-level declaration syntactically.

treesit-defun-type-regexp defines what constructs to indent.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/c-ts-mode.el.gz
(defun c-ts-mode-indent-defun ()
  "Indent the current top-level declaration syntactically.

`treesit-defun-type-regexp' defines what constructs to indent."
  (interactive "*")
  (when-let* ((orig-point (point-marker))
              (range (c-ts-mode--emacs-defun-at-point t)))
    (indent-region (car range) (cdr range))
    (goto-char orig-point)))