Go to the first, previous, next, last section, table of contents.


Motion by Words

These functions for parsing words use the syntax table to decide whether a given character is part of a word. See section Syntax Tables.

Command: forward-word count
This function moves point forward count words (or backward if count is negative). "Moving one word" means moving until point crosses a word-constituent character and then encounters a word-separator character (or the boundary of the accessible part of the buffer).

If it is possible to move count words, without being stopped by the buffer boundary (except perhaps after the last word), the value is t. Otherwise, the return value is nil and point stops at the buffer boundary.

In an interactive call, count is set to the numeric prefix argument.

Command: backward-word count
This function is just like forward-word, except that it moves backward until encountering the front of a word, rather than forward.

In an interactive call, count is set to the numeric prefix argument.

This function is rarely used in programs, as it is more efficient to call forward-word with a negative argument.

Variable: words-include-escapes
This variable affects the behavior of forward-word and everything that uses it. If it is non-nil, then characters in the "escape" and "character quote" syntax classes count as part of words. Otherwise, they do not.


Go to the first, previous, next, last section, table of contents.