Previous: , Up: High-Level Text Primitives   [Contents][Index]


15.5 Filling

Filling is an operation on text that breaks long lines at word boundaries before a given column and merges shorter lines together in an attempt to make each line roughly the specified length. This is different from justification which tries to add whitespace in awkward places to make each line exactly the same length. Hemlock’s filling optionally inserts a specified string at the beginning of each line. Also, it eliminates extra whitespace between lines and words, but it knows two spaces follow sentences (see section text-functions).

Hemlock Variable: Fill Column (initial value 75)
Hemlock Variable: Fill Prefix (initial value nil)

These variables hold the default values of the prefix and column arguments to Hemlock’s filling primitives. If Fill Prefix is nil, then there is no fill prefix.

Function: fill-region region &optional prefix column

This deletes any blank lines in region and fills it according to prefix and column. Prefix and column default to Fill Prefix and Fill Column.

Function: fill-region-by-paragraphs region &optional prefix column

This finds paragraphs (see section text-functions) within region and fills them with fill-region. This ignores blank lines between paragraphs. Prefix and column default to Fill Prefix and Fill Column.


Previous: Logical Pages, Up: High-Level Text Primitives   [Contents][Index]