Function: yaml-fill-paragraph
yaml-fill-paragraph is an interactive and natively compiled function
defined in yaml-mode.el.
Signature
(yaml-fill-paragraph &optional JUSTIFY REGION)
Documentation
Fill paragraph.
Outside of comments, this behaves as fill-paragraph except that
filling does not cross boundaries of block literals. Inside comments,
this will do usual adaptive fill behaviors.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/fxfawcfn8g3mqnf4q0lmvgvy0vp3nxrx-emacs-packages-deps/share/emacs/site-lisp/elpa/yaml-mode-20260830.2340/yaml-mode.el
(defun yaml-fill-paragraph (&optional justify region)
"Fill paragraph.
Outside of comments, this behaves as `fill-paragraph' except that
filling does not cross boundaries of block literals. Inside comments,
this will do usual adaptive fill behaviors."
(interactive "*P")
;; FIXME: Can we get away with setting only `fill-forward-paragraph-function'?
(save-restriction
(yaml-narrow-to-block-literal)
(let ((fill-paragraph-function nil))
(or (fill-comment-paragraph justify)
(fill-paragraph justify region)))))