Next: Skipping Characters, Previous: Screen Lines, Up: Motion [Contents][Index]
Here are several functions concerned with balanced-parenthesis expressions (also called sexps in connection with moving across them in SXEmacs). The syntax table controls how these functions interpret various characters; see Syntax Tables. See Parsing Expressions, for lower-level primitives for scanning sexps or parts of sexps. For user-level commands, see Lists and Sexps in SXEmacs Reference Manual.
This function moves forward across arg balanced groups of parentheses. (Other syntactic entities such as words or paired string quotes are ignored.) arg defaults to 1 if omitted. If arg is negative, move backward across that many groups of parentheses.
This function moves backward across count balanced groups of parentheses. (Other syntactic entities such as words or paired string quotes are ignored.) count defaults to 1 if omitted. If count is negative, move forward across that many groups of parentheses.
This function moves forward out of count levels of parentheses. A negative argument means move backward but still to a less deep spot.
This function moves forward into count levels of parentheses. A negative argument means move backward but still go deeper in parentheses (-count levels).
This function moves forward across count balanced expressions. Balanced expressions include both those delimited by parentheses and other kinds, such as words and string constants. count defaults to 1 if omitted. If count is negative, move backward across that many balanced expressions. For example,
---------- Buffer: foo ---------- (concat∗ "foo " (car x) y z) ---------- Buffer: foo ----------
(forward-sexp 3) ⇒ nil ---------- Buffer: foo ---------- (concat "foo " (car x) y∗ z) ---------- Buffer: foo ----------
This function moves backward across count balanced expressions. count defaults to 1 if omitted. If count is negative, move forward across that many balanced expressions.
This function moves back to the countth beginning of a defun. If count is negative, this actually moves forward, but it still moves to the beginning of a defun, not to the end of one. count defaults to 1 if omitted.
This function moves forward to the countth end of a defun. If count is negative, this actually moves backward, but it still moves to the end of a defun, not to the beginning of one. count defaults to 1 if omitted.
If non-nil
, this variable holds a regular expression that
specifies what text can appear before the open-parenthesis that starts a
defun. That is to say, a defun begins on a line that starts with a
match for this regular expression, followed by a character with
open-parenthesis syntax.
Next: Skipping Characters, Previous: Screen Lines, Up: Motion [Contents][Index]