Previous: , Up: Moving by Word and Paragraph   [Index]


6.5.3.3 What Constitutes a Paragraph

The paragraph commands rely on a set of variables that define the beginning and end of a paragraph:

Variable: paragraph-start

Regexp for beginning of a line that starts OR separates paragraphs. This regexp should match lines that separate paragraphs and should also match lines that start a paragraph (and are part of that paragraph).

Variable: paragraph-separate

Regexp for beginning of a line that separates paragraphs.

This specifies how to distinguish lines that start paragraphs from lines that separate them.

Variable: use-hard-newlines

Non-nil if ‘Use-Hard-Newlines’ mode is enabled. Use the command ‘use-hard-newlines’ to change this variable.

Function: use-hard-newlines &optional arg insert

Toggle between hard and soft newlines in the current buffer.

hard newlines

text-property ‘hard’ on newlines

soft newlines

Newlines not marked "hard" are called "soft", and are always internal to paragraphs. The fill functions insert and delete only soft newlines.

ARG

If called from Lisp, toggle the mode if ‘ARG’ is ‘toggle’. Enable the mode if ‘ARG’ is nil, omitted, or is a positive number. Disable the mode if ‘ARG’ is a negative number.

INSERT

When enabling, if there are newlines in the buffer but no hard newlines, ask the user whether to mark as hard any newlines preceding a ‘paragraph-start’ line. From a program, second arg ‘INSERT’ specifies whether to do this;

never

to change nothing,

t / always

to force marking, ‘guess’ to try to do the right thing with no questions,

nil

or anything else to ask the user.

When enabled, the functions ‘newline’ and ‘open-line’ add the text-property ‘hard’ to newlines that they insert, and a line is only considered as a candidate to match ‘paragraph-start’ or ‘paragraph-separate’ if it follows a hard newline.

Function: paragraph-indent-minor-mode &optional arg

Minor mode for editing text, with leading spaces starting a paragraph.

In this mode, you do not need blank lines between paragraphs when the first line of the following paragraph starts with whitespace, as with ‘paragraph-indent-text-mode’.

Function: paragraph-indent-text-mode

Major mode for editing text, with leading spaces starting a paragraph.

In this mode, you do not need blank lines between paragraphs when the first line of the following paragraph starts with whitespace.

ispell-complete-word (‘C-M-i’)

Try to complete the word before or at point.

INTERIOR-FRAG

when non-nil, the word may be a character sequence inside of a word.


Previous: Sub- and Superword Movement—Glasses Mode, Up: Moving by Word and Paragraph   [Index]