Function: c-ts-common--fill-paragraph

c-ts-common--fill-paragraph is an interactive and byte-compiled function defined in c-ts-common.el.gz.

Signature

(c-ts-common--fill-paragraph &optional ARG)

Documentation

Filling function for c-ts-common.

ARG is passed to fill-paragraph.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/c-ts-common.el.gz
(defun c-ts-common--fill-paragraph (&optional arg)
  "Filling function for `c-ts-common'.
ARG is passed to `fill-paragraph'."
  (interactive "*P")
  (save-restriction
    (widen)
    (let ((node (treesit-node-at (point))))
      (when (string-match-p c-ts-common--comment-regexp
                            (treesit-node-type node))
        (if (c-ts-common--line-comment-p node)
            (fill-comment-paragraph arg)
          (c-ts-common--fill-block-comment arg)))
      ;; Return t so `fill-paragraph' doesn't attempt to fill by
      ;; itself.
      t)))