Save Definitions As Text... Like Save Definitions As..., but the file is saved in plain-text format (see DrScheme Files). Subsequent saves also write in plain-text format.
Save Interactions As Text... Like Save Interactions As..., but the file is saved in plain-text format (see DrScheme Files). Subsequent saves are write in plain-text format.
Log Definitions and Interactions... Starts a running of log of the text in the interactions and definitions windows, organized by executions. In a directory of your choosing, DrScheme saves files with the names 01-definitions, 01-interactions, 02-definitions, 02-interactions, etc as you execute and interact with various programs.
Quit or Exit Exits DrScheme (under Mac OS X this menu item is in the apple menu).
All Edit menu items operate on either the definitions or interactions window, depending on the location of the selection or blinking caret. Each window maintains its own Undo and Redo history.
Preferences... opens the preferences dialog. See section 3.2 (In Mac OS X, this menu item is under the apple menu)
One each of the following show/hide pairs of menu items appears at any time.
Show Profile Shows the current profiling report. This menu is only useful if you have enabled profiling in the Language dialog. Profiling does not apply to all languages. When it does, the checkbox that enables it is in the details portion of the dialog.
If the window has been split before, this menu item becomes enabled, allowing you to collapse the split window.
Note: whenever a program is executed, the interactions window is made visible if it is hidden.
Choose Language Opens a dialog for selecting the current evaluation language. Click Execute to make the language active in the interactions window. See section 2.5 for more information about the languages.
Add Teachpack... Opens a find-file dialog for choosing a teachpack to extend the current language. Click Execute to make the teachpack available in the interactions windows. See Extending DrScheme for information on creating teachpacks.
In addition to the above menus, there is a menu item for each teachpack that clears only that one teachpack.
Create Executable... Creates a separate launcher for running your program. See Executables for more info.
The module browser window contains a square for each module. The squares are colored based on the number of lines of code in the module. If a module has more lines of code, it gets a darker color.
In addition, for each normal import, a blue line drawn is from the module to the importing module. Similarly, purple lines are drawn for each for-syntax import. In the initial module layout, modules to the left import modules to the right, but since modules can be moved around interactively, that property might not be preserved.
To open the file corresponding to the module, right click on the box for that module (control-click under Mac OS).
Uncomment Removes all ``;'' characters at the start of each selected line of text or removes a comment box around the text. Uncommenting only removes a ``;'' if it appears at the start of a line and it only removes the first ``;'' on each line.
Disable All Test Cases Creates a new test case box (see section 2.10)
Insert Lambda Inserts the symbol lambda
into the program. This has the same behavior as if
lambda were typed at this point, except that the
lambda symbol is implicitly delimited from neighboring
Insert Delta (define) Inserts the symbol
delta into the program. This has the same behavior as
define were typed at this point, except that
the delta symbol is implicitly delimited from
Insert Java Comment Box Inserts a box that is ignored by DrScheme, unlike the Insert Comment Box menu item, this is designed for the ProfessorJ language levels. See the ProfessorJ Beginner Language, ProfessorJ Intermediate Language, and ProfessorJ Advanced Language manuals for details.
This menu item inserts an XML box. XML boxes must contain XML's concrete syntax and they evaluate to x-expressions, which are s-expressions representing the XML expression. See also XML in DrScheme.
Inserts a Scheme box. These boxes contain Scheme code and are meant to be inside XML boxes. See also XML in DrScheme.
Inserts a Scheme splice box. These boxes are intended to be inside XML boxes. The Scheme expression inside must evaluate to a list and that list is spliced into the containing XML box. See also XML in DrScheme.
Insert Test Case Creates a new test case box (see section 2.10)
Opens a window that lists all of the opened DrScheme frames. Selecting one of them brings the window to the front.
Additionally, after the above menu items, this menu contains an entry for each window in DrScheme. Selecting a menu item brings the corresponding window to the front.
Opens an internet connection to check if there have been any updates to various installed DrScheme packages.
This submenu has a list of related web sites. Choosing one of them sends a message to an external browser to visit the web site.
This submenu has a list of web sites for the add-on tools in your DrScheme. Choosing one of them sends a message to an external browser to visit the web site.
The preferences dialog comprises several panels:
The Syntax Coloring panel has several subpanels that enable you to configure the colors that DrScheme uses for its online coloring and for Check Syntax.
The Editing panel consists of several sub-panels:
Auto-save files -- If checked, the editor generates autosave files (see DrScheme Files) for files that have not been saved after five minutes.
Backup files -- If checked, when saving a file for the first time in each editing session, the original copy of the file is copied to a backup file in the same directory. The backup files have the same name as the original, except that they end in either .bak or ~.
Use separate dialog for searching -- If checked, then selecting the Find menu item opens a separate dialog for searching and replacing. Otherwise, selecting Find opens an interactive search-and-replace panel at the bottom of a DrScheme window.
Enable keybindings in menus -- If checked, some DrScheme menu items have keybindings. Otherwise, no menu items have key bindings. This preference is designed for people who are comfortable editing in Emacs and find the standard menu keybindings interfere with the Emacs keybindings.
Highlight between matching parens -- If checked, the editor marks the region between matching parenthesis with a gray background (in color) or a stipple pattern (in monochrome) when the flashing caret is next to a parenthesis.
Ask before changing save format -- If checked, DrScheme consults the user before saving a file in non-text format (see DrScheme Files).
Only warn once when executions and interactions are not synchronized -- If checked, DrScheme warns the user on the first interaction after the definitions window, language, or teachpack is changed without a corresponding click on Execute. Otherwise, the warning appears on every interaction.
Ask about clearing test coverage -- If checked, when test coverage annotations are displayed DrScheme prompts about removing them. This setting only applies to the PLT languages. DrScheme never asks in the teaching languages.
This preference panel configures the profiling report. The band of color shows the range of colors that profiled functions take on. Colors near the right are used for code that is not invoked often and colors on the right are used for code that is invoked often.
If you are interested in more detail at the low end, choose the ``Square root'' check box. If you are interested in more detail at the upper end, choose the ``Square'' check box.
The Use Help Desk browser for external URLs check box determines if Help Desk visits urls that lead out of our documentation in the platform-specific browser, or with Help Desk itself.
Most key presses simply insert a character into the editor (``a'', ``3'', ``('', etc.). Other keys and key combinations act as keyboard shortcuts that move the blinking caret, delete a line, copy the selection, etc. Keyboard shortcuts are usually trigger by key combinations using the Control, Meta, or Command key.
key = This means press the Control key, hold it
down and then press
key and then release them
both. For example: C-e (Control-E) moves the blinking caret to the end
of the current line.
key = Same as C-
key, except with the
Meta key. Depending on your keyboard, Meta may be called ``Left'',
``Right'' or have a diamond symbol, but it's usually on the bottom row next
to the space bar. M-
key can also be performed as a
two-character sequence: first, strike and release the Escape key, then
key. Under Windows and Mac OS, Meta is only
available through the Escape key.
DEL = The Delete key.
SPACE = The Space bar.
Note: On most keyboards, ``<'' and ``>'' are shifted characters. So, to get M->, you actually have to type Meta-Shift->. That is, press and hold down both the Meta and Shift keys, and then strike ``>''.
Note: Many of the key bindings can also be done with menu items.
Under Windows, some of these keybindings are actually standard menu items. Those keybindings will behave according to the menus, unless the Enable keybindings in menus preference is unchecked.
If you are most familiar with Emacs-style key bindings, you should uncheck the Enable keybindings in menus preference. Many of the keybindings below are inspired by Emacs.
M-> move to end of file
C-p move to previous line (up)
M-C-p match parentheses backward
A-C-down move down into an embedded editor
M-C-k delete forward one S-expression
C-y paste from clipboard (yank)
M-C-t transpose sexpressions
M-C-k cut complete sexpression
M-S-L wrap selection in (lambda () ...) and put the insertion point in the arglist of the lambda
C-x u undo
M-o toggle overwrite mode
The interactions window has all of the same keyboard shortcuts as the definitions window plus a few more:
M-n bring the expression after the current expression in the expression history down to the prompt.
The standard extension for a Scheme program file is .scm. The extensions .ss and .sch are also acceptable.
DrScheme's editor can saves a program file in two different formats:
Plain-text format -- All text editors can read this format. DrScheme saves a program in plain-text format by default, unless the program contains images or text boxes. (Plain-text format does not preserve images or text boxes.)
Plain-text format is platform-specific because different platforms have different newline conventions. However, most tools for moving files across platforms support a ``text'' transfer mode that adjusts newlines correctly.
Multimedia format -- This format is specific to DrScheme, and no other editor recognizes it. DrScheme saves a program in multimedia format by default when the program contains images, text boxes, or formatted text.
Multimedia format is platform-independent. Use a ``binary'' transfer mode when moving multimedia-format files across platforms. (Using ``text'' mode may corrupt the file.)
When you modify an existing file in DrScheme and save it, DrScheme copies the old version of the file to a special backup file if no backup file exists. The backup file is saved in the same directory as the original file, and the backup file's name is generated from the original file's name:
Under Unix and Mac OS, a tilde (~) is added to the end of the file's name.
When a file in an active DrScheme editor is modified but not saved, DrScheme saves the file to a special autosave file after five minutes (in case of a power failure or catastrophic error). If the file is later saved, or if the user exists DrScheme without saving the file, the autosave file is removed. The autosave file is saved in the same directory as the original file, and the autosave file's name is generated from the original file's name:
Under Unix and Mac OS, a pound sign (#) is added to the start and end of the file's name, then a number is added after the ending pound sign, and then one more pound sign is appended to the name. The number is selected to make the autosave filename unique.
Under Windows, the file's extension is replaced with a number to make the autosave filename unique.
On start-up, DrScheme reads configuration information from a preferences file. The name and location of the preferences file depends on the platform and user:2
Under Windows, if the HOMEDRIVE and HOMEPATH environment variables are defined, preferences are stored in %HOMEDRIVE%\%HOMEPATH%\plt-prefs.ss, otherwise preferences are stored in plt-prefs.ss in the directory containing the MrEd executable.
Windows NT, XP, 2000: When DrScheme is launched under Windows NT, XP, or 2000 and HOMEDRIVE and HOMEPATH are not set, Windows automatically sets the variables to indicate the root directory of the main disk. Therefore, when HOMEDRIVE and HOMEPATH are not set, the preferences file plt-prefs.ss is saved in the root directory of the main disk.
A lock file is used while modifying the preferences file, in the same directory as the preferences file. Under Windows and Mac OS Classic, the lock file is named .LOCKplt-prefs.ss, and on other platforms, it is .LOCK.plt-prefs.ss.
If the user-specific preferences file does not exist, and the file plt-prefs.ss in the defaults collection does exist, then it is used for the initial preference settings. (See Library Collections and MzLib for more information about collections.) This file thus allows site-specific configuration for preference defaults. To set up such a configuration, start DrScheme and configure the preferences to your liking. Then, exit DrScheme and copy your preferences file into the defaults collection as plt-prefs.ss. Afterward, users have no preferences will get the preference settings you chose.
2 The MzScheme procedure
returns the platform-specific path when given the argument