[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

30.2.1 Motion by Characters

These functions move point based on a count of characters. goto-char is the fundamental primitive; the other functions use that.

Command: goto-char position
This function sets point in the current buffer to the value position. If position is less than 1, it moves point to the beginning of the buffer. If position is greater than the length of the buffer, it moves point to the end.

If narrowing is in effect, position still counts from the beginning of the buffer, but point cannot go outside the accessible portion. If position is out of range, goto-char moves point to the beginning or the end of the accessible portion.

When this function is called interactively, position is the numeric prefix argument, if provided; otherwise it is read from the minibuffer.

goto-char returns position.

Command: forward-char &optional count
This function moves point count characters forward, towards the end of the buffer (or backward, towards the beginning of the buffer, if count is negative). If the function attempts to move point past the beginning or end of the buffer (or the limits of the accessible portion, when narrowing is in effect), an error is signaled with error code beginning-of-buffer or end-of-buffer.

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

Command: backward-char &optional count
This function moves point count characters backward, towards the beginning of the buffer (or forward, towards the end of the buffer, if count is negative). If the function attempts to move point past the beginning or end of the buffer (or the limits of the accessible portion, when narrowing is in effect), an error is signaled with error code beginning-of-buffer or end-of-buffer.

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


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on May 2, 2002 using texi2html