Function: pixel-fill--fill-line

pixel-fill--fill-line is a byte-compiled function defined in pixel-fill.el.gz.

Signature

(pixel-fill--fill-line WIDTH &optional INDENTATION)

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/pixel-fill.el.gz
(defun pixel-fill--fill-line (width &optional indentation)
  (let ((start (point)))
    (pixel-fill--goto-pixel width)
    (while (not (eolp))
      ;; We have to do some folding.  First find the first previous
      ;; point suitable for folding.
      (when (or (not (pixel-fill-find-fill-point (line-beginning-position)))
                (= (point) start))
	;; We had unbreakable text (for this width), so just go to
	;; the first space and carry on.
	(beginning-of-line)
	(skip-chars-forward " ")
	(search-forward " " (line-end-position) 'move))
      (when (= (preceding-char) ?\s)
	(delete-char -1))
      (unless (eobp)
        (insert ?\n)
        (when (> indentation 0)
          (insert (propertize " " 'display
                              (list 'space :align-to (list indentation))))))
      (setq start (point))
      (unless (eobp)
        (pixel-fill--goto-pixel width)))))