Edit Menu
The Edit Menu contains commands that mostly deal with editing text
although some commands are appropriate for non-text objects (Cut and
Copy work on components on a form, e.g.) The commands on the menu are:
- Undo --
Undoes the last edit-like operation, if possible.
- Cut --
Delete the current selection and place it on the clipboard so it can
be pasted.
- Copy --
Copy the current selection to the clipboard so it can be pasted.
- Paste --
Pastes from the clipboard to the current location in the
currently-selected window. Usually, text is pasted but controls on a
form can also be copied or cut and pasted.
- Delete --
Delete the current selection without placing it on the clipboard (so
it cannot be pasted).
- Change Case -- Displays a submenu with UPCASE,
downcase, and Capitalize as the commands. Choosing one
changes the selected text as desired. Only alphabetic characters are
affected. Capitalize leaves words like the and a downcased.
- Comment In/Out --
Comment in indents any selected text and puts semicolons at the line
beginning making the text into a comment. Comment out uncomments text
which was commented in. This is a rote command so commenting out text
which was not first commented in has undefined effect.
- Reindent --
Rearranges the selected code in a text buffer with traditional Lisp
indentation. The pretty-printer
configuration property, set directly or with the Pretty Print field on
the Editor tab on the Options dialog,
affects this command. If the value of that field is :reindent,
reindenting will change the indentation of each line but not move
things between lines. If the value is :pretty-print, the number of
lines and their contents may change to provide the optimal result. The
reindenting is simply for appearance. No syntactic changes are made to
the code, of course.
Macro expansion commands
The next four commands macroexpand selected forms.
The IDE macroexpansion
commands are useful only when a complete lisp expression is
selected. They are typically used in the IDE Editor, where a lisp
expression may be selected by double-clicking immediately to the left
of the expression's opening parenthesis. The expanded source code is
printed to the Debug Window.
- Macro Expand --
Macroexpands the top-level selected macro call iteratively, by calling
macroexpand. That is, if the
initial expansion produces another top-level macro call, that call
will also be expanded and so on, but non-top-level macro calls
elsewhere in the form will not be expanded. See Walk Form, which recursively
macroexpands all subforms.
- Walk Form --
does a complete macro expansion of the selected form
by recursively macroexpanding all macro calls in the selected form.
The related Compiler Walk Form
does the same but also considers compiler macros
and performs certain other compiler transformations to the source.
(Thus, Walk Form applied to
(list
1)
, displays (list 1)
, because the
compiler-macro associated with list is ignored.)
- Compiler Walk Form -- does a complete macro expansion of the
selected form by recursively macroexpanding all macro calls in the
selected form, taking compiler-macros into account and performing
certain other compiler transformations to the source. Contrast with
the related Compiler Walk Form. (Thus, Compiler Walk
Form applied to
(list 1)
, displays
(cons 1 nil)
, because the compiler-macro associated
with list is used.)
- Set Mark --
Establishes a bookmark (called simply "the mark") at the current text
cursor position in the selected editor buffer. The mark is used by the
other mark-related commands Swap with Mark and
Select to Mark. In particular, Swap with
Mark scrolls the buffer back to the mark.
There is only a
single mark that is set by the interactive commands, though multiple
marks may be set programmatically (see make-mark). Marks know how to
retain the same logical position within the text when text before the
mark is inserted or deleted.
This command may be useful for returning to a buffer position after
some other IDE command scrolls the buffer away from it. For example,
if the Find Definition command shows a
definition in a pre-existing editor buffer, it first sets the mark
before scrolling to the new definition. This allows using the Swap with
Mark command to toggle between viewing the newly-found
definition and whatever was being viewed in the same editor buffer
beforehand.
- Swap with Mark --
Sets the selected editor buffer's mark to the current text cursor
position, and moves the text cursor to the previous mark position,
scrolling the buffer as needed to show that position. In other words,
after the mark is set at one position (see Edit | Set
Mark) and then the text cursor is moved to some other
position, repeatedly invoking Swap with Mark toggles between
viewing the two areas of the editor buffer around these two positions.
This command may be useful for returning to a buffer position after
some other IDE command scrolls the buffer away from it. For example,
if the Find Definition command shows a
definition in a pre-existing editor buffer, it first sets the mark
before scrolling to the new definition. This allows using the Swap
with Mark command to toggle between viewing the newly-found definition
and whatever was being viewed in the same editor buffer beforehand.
- Select to Mark --
Selects the text in the selected editor buffer between the current
text cursor position and the mark position (see Edit | Set
Mark). This command may be useful for selecting a large
range of text which cannot be scrolled entirely into the editor
window.
- Display Selection --
Scrolls the selected editor buffer so that the currently selected text
(or the current text cursor position if no text is selected) is in
view. (The text cursor position may not be in view if, for example,
the scrollbars have been used to scroll it out of view.)
Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page was not revised from the 6.1 page.
Created 2002.2.26.