(fill-context-prefix): If the second line has the first line prefix,
plus whitespace, use the part that the first line shares.
(fill-individual-paragraphs): When prefix changes,
usually get the new prefix from just one line,
with an exception for indented first lines of paragraphs.
Start a new paragraph when a line has extra indentation
after the fill prefix.
second line of the paragraph, verify the first line has it too.
(adaptive-fill-regexp): Allow - and |;
allow spaces within the prefix. Allow numeric headings.
(adaptive-fill-first-line-regexp): New variable.
(fill-context-prefix): Use adaptive-fill-first-line-regexp.
If prefix from first line seems unreasonable, use whitespace instead.
Reject it entirely only if it is a paragraph-starter.
Don't add extra newline at end if there is no text in paragraph --
doing so can make fill-region loop.
When testing for indentation exceeding fill-column, skip back over tabs too.
(fill-context-prefix): Use adaptive-fill-regexp only if non-nil.
(fill-context-prefix): Check adaptive-fill-function non-nil.
is supposed to match text STARTING at the left margin, use
`looking-at' rather than `re-search-forward'.
(fill-individual-paragraphs): Match fill-prefixes starting at left-margin.
(fill-context-prefix): New function.
(fill-region-as-paragraph): Don't insert extra space
at end of filled region.
(fill-individual-paragraphs): Insist on nonempty header name,
in the special mailp case.
on first line of paragraph if it's a paragraph-separate line.
Don't look past the intended line.
(adaptive-fill-function): New variable.
(fill-region-as-paragraph): Use it.
(colon-double-space): New variable.
(canonically-space-region): Put two spaces after colon if necessary.
(fill-region-as-paragraph): In adaptive-fill-mode,
if paragraph has one line, take the fill prefix from it.
(adaptive-fill-regexp): Doc fix.
(fill-individual-paragraphs): Use `adaptive-fill-regexp'
to determine `fill-prefix' if `adaptive-fill-mode' is non-nil.
(fill-region-as-paragraph): don't delete hard newlines. ignore whitespace
at beginning of region. Remove justification indentation.
(fill-region): Don't use paragraph-movement commands when use-hard-newlines
is true, just search for hard newlines.
(current-justification): take care at EOB.
(set-justification): new argWHOLE-PAR. Callers changed.
(justify-current-line): Error if JUSTIFY arg is not reasonable.
Better interaction if there is a fill-prefix.
"Line too long" warning removed.
(unjustify-current-line, unjustify-region): New functions.
(set-justification-{none,left,right,full,center}): New functions.
(fill-region-as-paragraph, fill-region, justify-current-line): New
arg NOSQUEEZE defeats normal removal of extra whitespace.
(fill-region-as-paragraph, fill-region)
(fill-nonuniform-paragraphs, fill-individual-paragraphs):
Arg JUSTIFY-FLAG (JUSTIFYP) renamed to JUSTIFY.
(fill-region-as-paragraph): Obey left-margin; fill-prefix starts
after left-margin. Disable filling if JUSTIFY == none, but indent to
margin anyway.
Adaptive-fill removes text-props from fill-prefixes it finds.
Adaptive-fill no longer has to notice left-margin: std fill does that.
Use fill-column and canonically-space-region functions.
(canonically-space-region): New fn split from fill-region-as-paragraph.
(fill-region): New args NOSQUEEZE (as above) and TO-EOP.
(default-justification): New variable.
(current-left-margin, fill-column, justification): New functions.
(fill-paragraph): Use fill-region-as-paragraph when possible.
(justify-current-line): New arguments; different kinds of
justification handled. Uses left-margin and fill-column functions.
at end of paragraph, to make sure text-properties are preserved.
(fill-paragraph): Call fill-region, not fill-region-as-paragraph,
to avoid clobbering paragraph-internal hard-newlines.
(fill-region): If use-hard-newlines is on, divide into
"paragraphs" by breaking at every hard newline, temporarily
ignoring paragraph-start.
don't fill the text before that, but count it for indentation.
(fill-region): If region starts in mid-line, keep whole line
in the region, but pass the region start to fill-region-as-paragraph.
after the fill column, don't stop at period with just one space.
When checking whether at beginning of line, if no fill prefix,
ignore intervening whitespace.
forward and backward characters and char-syntax to be smart about
filling syntaxes other than text.
This change was inspired by Richard Caley's fill-para package from LCD,
but the implementation is original.