Next: , Previous: , Up: Editing Lisp   [Contents][Index]


8.2 Form Manipulation

These commands manipulate Lisp forms, the printed representations of Lisp objects. A form is either an expression balanced with respect to parentheses or an atom such as a symbol or string.

Command: Forward Form (bound to C-M-f)
Command: Backward Form (bound to C-M-b)

Forward Form moves to the end of the current or next form, while Backward Form moves to the beginning of the current or previous form. A prefix argument is treated as a repeat count.

Command: Forward Kill Form (bound to C-M-k)
Command: Backward Kill Form (bound to C-M-Delete, C-M-Backspace)

Forward Kill Form kills text from the point to the end of the current form. If at the end of a list, but inside the close parenthesis, then kill the close parenthesis. Backward Kill Form is the same, except it goes in the other direction. A prefix argument is treated as a repeat count.

Command: Mark Form (bound to C-M-@)

This command sets the mark at the end of the current or next form.

Command: Transpose Forms (bound to C-M-t)

This command transposes the forms before and after the point and moves forward. A prefix argument is treated as a repeat count. If the prefix argument is negative, then the point is moved backward after the transposition is done, reversing the effect of the equivalent positive argument.

Command: Insert () (bound to M-()

This command inserts an open and a close parenthesis, leaving the point inside the open parenthesis. If a prefix argument is supplied, then the close parenthesis is put at the end of the form that many forms from the point.

Command: Extract Form

This command replaces the current containing list with the next form. The entire affected area is pushed onto the kill ring. If an argument is supplied, that many upward levels of list nesting is replaced by the next form. This is similar to Extract List, but this command is more generally useful since it works on any kind of form; it is also more intuitive since it operates on the next form as many Lisp mode commands do.


Next: List Manipulation, Previous: Lisp Mode, Up: Editing Lisp   [Contents][Index]