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:
- Cut --
Deletes the current selection and places it on the clipboard so it can
- Copy --
Copies 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. See also Pop and
- Pop and Paste -- Pops the topmost item off of the Lisp clipboard
stack, and then pastes the item that is now at the top of the stack.
Doing a Paste followed by a Pop and
Paste, for example, would paste the two most recently copied
- Delete --
Deletes 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 typically leaves words like the and
a downcased, but the first selected letter is always upcased.
- 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
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. If reindenting a large form is taking too
long, it can be interrupted by pressing the Escape key. The form may
be left partially reindented, though, if indentation is
- Insert Special Char -- Allows you to insert an untypable character
either into the editor or into any other text-editing widget in the
IDE. A dialog of all characters in the Latin1 character set is shown,
and the one that you select will be inserted. This may be useful, for
example, in the modal
Search | Find Forward or Search |
Find Backward dialog or the
Search | Find Definition dialog. For
single-line editable-text controls, you may need to use the Control-Q
keyboard shortcut rather than showing the menu, or else the current
text cursor position will not be retained for the insertion.
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), 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 Walk Form. (Thus, Compiler Walk
Form applied to
(list 1), displays
(cons 1 nil), because the compiler-macro associated
with list is used.)
Mark and selection commands
The final four commands deal with the mark (a specified location in
text) and with selected text.
The first two commands, Set Mark and Swap with
Mark, 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
- 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.
- 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
- 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-2015, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 9.0. This page was not revised from the 8.2 page.