Function: kview:fill-region

kview:fill-region is a byte-compiled function defined in kview.el.

Signature

(kview:fill-region START END &optional KCELL JUSTIFY)

Documentation

Fill region between START and END within current view.

With optional KCELL, assume START and END delimit that cell's contents. With optional JUSTIFY, justify region as well. Fill-prefix must be a string of spaces the length of this cell's indent, when this function is called.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kview.el
(defun kview:fill-region (start end &optional kcell justify)
  "Fill region between START and END within current view.
With optional KCELL, assume START and END delimit that cell's contents.
With optional JUSTIFY, justify region as well.
Fill-prefix must be a string of spaces the length of this cell's indent, when
this function is called."
  (let ((opoint (set-marker (make-marker) (point)))
	(lbl-sep-len (kview:label-separator-length kotl-kview))
	(continue t)
	prev-point)
    (goto-char start)
    (while continue
      (if (kcell:get-attr (or kcell (kcell-view:cell)) 'no-fill)
	  (setq continue (kcell-view:next nil lbl-sep-len))
	(fill-paragraph justify t)
	(setq prev-point (point))
	(forward-paragraph)
	(re-search-forward "[^ \t\n\r]" nil t))
      (setq continue (and continue
			  (/= (point) prev-point)
			  (< (point) (min end (point-max))))))
    ;; Return to original point.
    (goto-char opoint)
    (set-marker opoint nil)))