All Manuals > LispWorks Editor User Guide > 4 Editing Lisp Programs

NextPrevUpTopContentsIndex

4.4 Forms

4.4.1 Movement, marking and indentation

Forward Form

Editor Command

Argument: None
Key sequence: Alt+Ctrl+F

Moves the current point to the end of the next form. A positive prefix argument causes the point to be moved the required number of forms forwards.

Backward Form

Editor Command

Argument: None
Key sequence: Alt+Ctrl+B

Moves the current point to the beginning of the previous form. A positive prefix argument causes the point to be moved the required number of forms backwards.

Mark Form

Editor Command

Argument: None
Key sequence: Alt+Ctrl+@

Puts the mark at the end of the current form. The current region is that area from the current point to the end of form. A positive prefix argument puts the mark at the end of the relevant form.

Indent Form

Editor Command

Argument: None
Key sequence: Alt+Ctrl+Q

If the current point is located at the beginning of a form, the whole form is indented in a manner that reflects the structure of the form. This command can therefore be used to format a whole definition so that the structure of the definition is apparent.

See editor:*indent-with-tabs* for control over the insertion of #\Tab characters by this and other indentation commands.

4.4.2 Killing forms

Forward Kill Form

Editor Command

Argument: None
Key sequence: Alt+Ctrl+K

Kills the text from the current point up to the end of the current form. A positive prefix argument causes the relevant number of forms to be killed forwards. A negative prefix argument causes the relevant number of forms to be killed backwards.

Backward Kill Form

Editor Command

Argument: None
Key sequence: Alt+Ctrl+Backspace

Kills the text from the current point up to the start of the current form. A positive prefix argument causes the relevant number of forms to be killed backwards. A negative prefix argument causes the relevant number of forms to be killed forwards.

Kill Backward Up List

Editor Command

Argument: None
Key sequence: None

Kills the form surrounding the current form. The cursor must be on the opening bracket of the current form. The entire affected area is pushed onto the kill-ring. A prefix argument causes the relevant number of surrounding lists to be removed.

For example, given the following code, with the cursor on the second open-bracket:

(print (do-some-work 1 2 3))

Kill Backward Up List would kill the outer form leaving this:

(do-some-work 1 2 3)

Also available through the function editor:kill-backward-up-list-command.

Extract List is a synonym for Kill Backward Up List.

4.4.3 Macro-expansion of forms

Macroexpand Form

Editor Command

Argument: None
Key sequence: Ctrl+Shift+M

Macro-expands the form after the current point. The output is sent to the Output window. A prefix argument causes the output to be displayed in the current buffer.

Walk Form

Editor Command

Argument: None
Key sequence: Alt+Shift+M

Produces a macroexpansion of the form after the current point. The output is sent to the Output window. A prefix argument causes the output to be displayed in the current buffer.

Note: Walk Form does not expand the Common Lisp macros cond, prog, prog* and multiple-value-bind, though it does expand their subforms.

4.4.4 Miscellaneous

Transpose Forms

Editor Command

Argument: None
Key sequence: Alt+Ctrl+T

Transposes the forms immediately preceding and following the current point. A zero prefix argument causes the forms at the current point and the current mark to be transposed. A positive prefix argument causes the form at or preceding the current point to be transposed with the form the relevant number of forms forward. A negative prefix argument causes the form at or preceding the current point to be transposed with the form the relevant number of forms backward.

Insert Double Quotes For Selection

Editor Command

Argument: None
Key sequence: Alt+"

Inserts a pair of double-quotes around the selected text, if any. If there is no selected text and a prefix argument p is supplied, insert them around the p following (or preceding) forms. Otherwise insert them at the current point. The point is left on the character after the first double-quote.


LispWorks Editor User Guide (Windows version) - 17 Aug 2017

NextPrevUpTopContentsIndex