Function: fill-region-as-paragraph

fill-region-as-paragraph is an interactive and byte-compiled function defined in fill.el.gz.

Signature

(fill-region-as-paragraph FROM TO &optional JUSTIFY NOSQUEEZE SQUEEZE-AFTER)

Documentation

Fill the region as if it were a single paragraph.

The behavior of this command is controlled by the variable fill-region-as-paragraph-function, with the default implementation being fill-region-as-paragraph-default.

The arguments FROM and TO define the boundaries of the region.

The optional third argument JUSTIFY, when called interactively with a prefix arg, is assigned the value full. When called from Lisp, JUSTIFY can specify any type of justification; see default-justification for the possible values. Optional fourth arg NOSQUEEZE non-nil means not to make spaces between words canonical before filling. Fifth arg SQUEEZE-AFTER, if non-nil, should be a buffer position; it means canonicalize spaces only starting from that position. See canonically-space-region for the meaning of canonicalization of spaces.

It returns the fill-prefix used for filling.

View in manual

Probably introduced at or before Emacs version 1.9.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/fill.el.gz
(defun fill-region-as-paragraph (from to &optional justify
				      nosqueeze squeeze-after)
  "Fill the region as if it were a single paragraph.
The behavior of this command is controlled by the variable
`fill-region-as-paragraph-function', with the default implementation
being `fill-region-as-paragraph-default'.

The arguments FROM and TO define the boundaries of the region.

The optional third argument JUSTIFY, when called interactively with a
prefix arg, is assigned the value `full'.
When called from Lisp, JUSTIFY can specify any type of justification;
see `default-justification' for the possible values.
Optional fourth arg NOSQUEEZE non-nil means not to make spaces between
words canonical before filling.
Fifth arg SQUEEZE-AFTER, if non-nil, should be a buffer position; it
means canonicalize spaces only starting from that position.
See `canonically-space-region' for the meaning of canonicalization of
spaces.

It returns the `fill-prefix' used for filling."
  (interactive (progn
		 (barf-if-buffer-read-only)
		 (list (region-beginning) (region-end)
		       (if current-prefix-arg 'full))))
  (funcall fill-region-as-paragraph-function
           from to justify nosqueeze squeeze-after))