Function: kfill:fill-paragraph
kfill:fill-paragraph is an interactive and byte-compiled function
defined in kfill.el.
Signature
(kfill:fill-paragraph &optional ARG SKIP-PREFIX-REMOVE)
Documentation
Fill paragraph at or after point when in kotl-mode.
Prefix ARG means justify as well. If SKIP-PREFIX-REMOVE is not nil, keep the paragraph prefix.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kfill.el
(defun kfill:fill-paragraph (&optional arg skip-prefix-remove)
"Fill paragraph at or after point when in kotl-mode.
Prefix ARG means justify as well. If SKIP-PREFIX-REMOVE is not
nil, keep the paragraph prefix."
(interactive (progn
(barf-if-buffer-read-only)
(list (when current-prefix-arg 'full) nil)))
;; This may be called from `fill-region-as-paragraph' in "filladapt.el"
;; which narrows the region to the current paragraph. A side-effect is
;; that the cell identifier and indent information needed by this function
;; when in kotl-mode is no longer visible. So we temporarily rewiden the
;; buffer here. Don't rewiden past the paragraph of interest or any
;; following blank line may be removed by the filling routines.
(save-restriction
(when (eq major-mode 'kotl-mode)
(narrow-to-region 1 (point-max)))
;; Emacs expects a specific symbol here.
(when (and arg (not (symbolp arg))) (setq arg 'full))
(or skip-prefix-remove (kfill:remove-paragraph-prefix))
(catch 'done
(unless fill-prefix
(let ((paragraph-ignore-fill-prefix nil)
;; Need this or Emacs ignores fill-prefix when
;; inside a comment.
(comment-multi-line t)
(fill-paragraph-handle-comment t)
(paragraph-start paragraph-start)
(paragraph-separate paragraph-separate)
fill-prefix)
(when (kfill:adapt t)
(throw 'done (fill-paragraph arg)))))
;; Kfill:adapt failed or fill-prefix is set, so do a basic
;; paragraph fill as adapted from par-align.el.
(kfill:fallback-fill-paragraph arg skip-prefix-remove))))