The Emacs commands for manipulating paragraphs are also on Meta keys.
backward-paragraph).
forward-paragraph).
mark-paragraph).
M-{ moves to the beginning of the current or previous paragraph, while M-} moves to the end of the current or next paragraph. Blank lines and text-formatter command lines separate paragraphs and are not considered part of any paragraph. If there is a blank line before the paragraph, M-{ moves to the blank line, because that is convenient in practice.
In Text mode, an indented line is not a paragraph break. If you want indented lines to have this effect, use Paragraph-Indent Text mode instead. See Text Mode.
In major modes for programs, paragraphs begin and end only at blank lines. This makes the paragraph commands useful, even though there are no paragraphs as such in a program.
When you have set a fill prefix, then paragraphs are delimited by all lines which don't start with the fill prefix. See Filling.
When you wish to operate on a paragraph, type M-h
(mark-paragraph) to set the region around it. For example,
M-h C-w kills the paragraph around or after point. M-h
puts point at the beginning and mark at the end of the paragraph point
was in. If point is between paragraphs (in a run of blank lines, or
at a boundary), the paragraph following point is surrounded by point
and mark. If there are blank lines preceding the first line of the
paragraph, one of these blank lines is included in the region. If the
region is already active, the command sets the mark without changing
point; furthermore, each subsequent M-h further advances the
mark by one paragraph.
The precise definition of a paragraph boundary is controlled by the
variables paragraph-separate and paragraph-start. The
value of paragraph-start is a regexp that should match any line
that either starts or separates paragraphs. The value of
paragraph-separate is another regexp that should match only lines
that separate paragraphs without being part of any paragraph (for
example, blank lines). Lines that start a new paragraph and are
contained in it must match only paragraph-start, not
paragraph-separate. Each regular expression must match at the
left margin. For example, in Fundamental mode, paragraph-start
is "\f\\|[ \t]*$", and paragraph-separate is
"[ \t\f]*$".
Normally it is desirable for page boundaries to separate paragraphs. The default values of these variables recognize the usual separator for pages.
blog comments powered by Disqus