GNU Info

Info Node: (emacs-lisp-intro.info)forward-paragraph

(emacs-lisp-intro.info)forward-paragraph


Next: etags Prev: forward-sentence Up: Regexp Search
Enter node , (file) or (file)node

`forward-paragraph': a Goldmine of Functions
============================================

   The `forward-paragraph' function moves point forward to the end of
the paragraph.  It is usually bound to `M-}' and makes use of a number
of functions that are important in themselves, including `let*',
`match-beginning', and `looking-at'.

   The function definition for `forward-paragraph' is considerably
longer than the function definition for `forward-sentence' because it
works with a paragraph, each line of which may begin with a fill prefix.

   A fill prefix consists of a string of characters that are repeated at
the beginning of each line.  For example, in Lisp code, it is a
convention to start each line of a paragraph-long comment with `;;; '.
In Text mode, four blank spaces make up another common fill prefix,
creating an indented paragraph.  (Note: Fill Prefix,
 for more information about fill prefixes.)

   The existence of a fill prefix means that in addition to being able
to find the end of a paragraph whose lines begin on the left-most
column, the `forward-paragraph' function must be able to find the end
of a paragraph when all or many of the lines in the buffer begin with
the fill prefix.

   Moreover, it is sometimes practical to ignore a fill prefix that
exists, especially when blank lines separate paragraphs.  This is an
added complication.

forward-paragraph in brief
Key parts of the function definition.
fwd-para let
The `let*' expression.
fwd-para while
The forward motion `while' loop.
fwd-para between paragraphs
Movement between paragraphs.
fwd-para within paragraph
Movement within paragraphs.
fwd-para no fill prefix
When there is no fill prefix.
fwd-para with fill prefix
When there is a fill prefix.
fwd-para summary
Summary of `forward-paragraph' code.

automatically generated by info2www version 1.2.2.9