All Manuals > LispWorks IDE User Guide > 3 Common Features


3.2 Setting preferences

Choose LispWorks > Preferences... or click or press Command+, (Command comma) to raise the Preferences dialog. This dialog is used to specify:

The tool-specific options are described in the chapter relevant to each tool.

The remainder of this section describes the general environment options. To see these, ensure that Environment is selected in the list on the left side of the Preferences dialog, and select the General , Emulation , Styles , and File Encodings tabs.

In all cases your setting is preserved for future use after you click OK to close the Preferences dialog.

3.2.1 General options

The first tab under Environment contains the General options.

Figure 3.2 The Preferences dialog The window options

Reuse all tools controls whether LispWorks uses an existing tool rather than starting up a new copy. For example if Reuse all tools is checked, if an editor is already open, choosing File > Open and selecting a new file causes the file to be opened in the existing editor.

Use separate Editor windows for each file controls whether LispWorks will open a separate Editor window for each file (or editor buffer) that you have in memory. In addition, when Use separate Editor windows for each file is checked, closing an Editor window will remove the underlying editor buffer from memory, possibly asking if you want to save it. The default setting is unchecked.

Note: for information about Editor windows, editor buffers and files, see Displaying and swapping between buffers.

By default a floating window offers access to the various IDE tools on Cocoa. If you do not want this, deselect the Show the tools on a floating toolbar option.

Check Use recent directory for opening files to make operations such as File > Open use the directory of the file most recently edited as the default directory in the file dialog. Deselect this option to make the dialog's default directory be the current working directory. Note that this option does not affect the Editor tool, for which the file dialog always uses the directory of the currently visible file as the default directory.

Check Use quality drawing to make the LispWorks IDE use quality (anti-aliased) drawing for editor and graph panes. This is the default setting. Controlling completion behavior

In-place completion is enabled by default in the IDE. If you prefer the modal dialog style of completion familiar to users of LispWorks 5.0 and previous versions, deselect the Use in-place completion option.

When using in-place completion to complete a filename, by default you must always select an item from the in-place completion window. You can accelerate this interaction by checking the option Auto-insert on single file completion . Then, if there is just one possible completion, it is automatically selected and appended to your input. Quitting the environment

Choose LispWorks > Quit LispWorks or press Command+Q to exit LispWorks.

You can control whether LispWorks prompts for confirmation before exiting, using LispWorks > Preferences... . The Confirm Before Exiting preference has these meanings:


LispWorks exits immediately.

When modified buffers

If there are modified editor buffers, a dialog asks you whether these should be saved before exiting.


A dialog asks you to confirm whether LispWorks should exit. Automatic filters on dialogs

The option Add a filter to dialog lists longer than: affects modal dialogs containing long lists. When the list is longer than the value of this option, the list has a filter, which you can use as described in Filtering modal dialog completion. Automatic use of Find Definitions view

The option Use Find Definitions list for more items than: affects the behavior of source location commands such as the editor commands Find Source and Find Source for Dspec, and the menu command Expression > Find Source . When the number of source location results exceeds the value of this option, then the results are immediately displayed in the Find Definitions view of an Editor tool. This is particularly useful when you need to locate the definition of a particular CLOS method from the generic function name.

The Find Definitions view is described in Finding definitions. Initialization file

By default LispWorks looks for a file .lispworks to be loaded automatically when LispWorks is started. You should create an initialization file and add to it Lisp code to initialize the LispWorks image to suit your needs.

The Preferences dialog can be used to specify a different initialization file, in the Initialization File area. You can either enter the path and filename directly into the text input box, or use the button to display a file selection dialog. Clicking on undoes any alterations entered.

Note: it is up to each user to create and maintain their own personal initialization file. A sample personal initialization file is supplied with LispWorks - see the file Library/lib/7-0-0-0/config/a-dot-lispworks.lisp in the LispWorks distribution.

3.2.2 Configuring the editor emulation

The second tab under Environment contains the Emulation options.

Figure 3.3 The Emulation tab of the Environment Preferences

Here you can configure the editor to behave according to one of two pre-defined editor input styles (emulations) which determine how keyboard input is processed and other properties such as the shape of the input cursor. You can also set the cursor blink rate and specify a key to use as an Emacs Meta key.

The choice of emulation affects the Editor and other LispWorks tools containing editors such as the Output Browser, Stepper and Profiler. Choosing the key input style

The Editor and other tools using capi:editor-pane offer two key input styles: Emacs emulation or Mac OS editor emulation. By default, Emacs emulation is used. To choose an emulation, select Environment > Emulation in the Preferences dialog as shown in Configuring the editor emulation and select one of the Editor keys are like ... options.

Note: In this and other manuals, the Emacs keys are generally given. For help with finding keys for editor commands, choose Help > Editing > Command to Key . Also see the files config/key-binds.lisp and config/mac-key-binds.lisp which contain the forms defining the keys for each input style. Specifying a Meta key

Many Emacs commands are accessed via key combinations such as Meta+X, yet the Macintosh keyboard does not have a Meta key. Instead of key combinations with Meta, you can use the Esc key as described in Using the keyboard. If you do not want to use the Esc key, you can specify a key to use as Meta. To specify a Meta key, select the Emulation tab of the Editor Preferences dialog.

To specify Command as the Emacs Meta key, select The Command key acts as the Emacs Meta key .

Note: this setting prevents the Command key from performing most of its normal shortcuts. Commonly-used Macintosh key commands now invoke Emacs commands. For instance, Command+X and Command+C no longer do cut and copy. Emacs cut and copy commands are, of course, available.

To specify Alt as the Emacs Meta key, select The Alt key acts as the Emacs Meta key.

Note that this means some useful Macintosh key commands such as Alt+3 (which enters # on a UK Macintosh keyboard) are not directly available. To use such a system-defined Alt key gesture, invoke the editor command Quoted Insert followed by the gesture. For example, to enter #, type Control+Q Alt+3. This editor command makes only the next gesture be interpreted in the system-defined way. Thereafter Alt again acts as the Emacs Meta key. Effect of the specified Meta key

If you have specified Alt or Command as the Emacs Meta key, then it acts as Meta when the input focus is in any capi:output-pane within any IDE tool. This includes the Text area of the Editor tool, the Listener area of the Listener tool, the Output areas of several tools, the echo area seen near the bottom of all tool windows, and graphs such as the Superclasses and Subclasses areas of the Class Browser. Setting the cursor blink rate

By default the editor cursor blinks on and off at the usual rate for your computer.

To change the blink rate, select Specify in the Cursor Blink Rate area. Either scroll to choose the rate in Milliseconds, or enter an integer between 100 and 2000.

To stop the editor cursor from blinking, select None in the Cursor Blink Rate area.

3.2.3 Setting the editor font, color and other style attributes

The third tab under Environment contains the Styles options.

Figure 3.4 The Styles tab of the Environment Preferences

By default the editor uses a system default font. You can choose an alternative font and see a sample of it displayed in the Editor Font area. Click in the Sample: area to raise a font chooser. After you select the font, the text "Click here to choose the font" is displayed in your selected font.

To make the LispWorks editor actually use your alternative font, select Override the system default font .

This specifies the font used in Editor and Listener windows and all other tools based on the editor, such as the Shell, Stepper and Profiler tools.

If you deselect Override the system default font the system remembers your choice of alternative font, but does not actually use it for display. Setting the text style attributes

By default the LispWorks IDE uses a variety of text styles to:

Note: The last two of these features operate only in Lisp mode.

To change the attributes of one or more text styles, first select Environment > Styles in the Preferences dialog as shown in Setting the editor font, color and other style attributes.

Then, to make Common Lisp symbols appear with red foreground rather than the default purple for example, first select Lisp Keyword in the Style Name list. Then select Specified alongside Foreground and double-click on the color area to the right. In the Color chooser that appears, choose the new color and click OK . Now click OK on the Preferences dialog and see the change in the way your Lisp code is displayed. You may need to force the editor window to redisplay, for example by scrolling, to see the change take effect.

For each named style, the Foreground and Background each have exactly one of the following values:


No special formatting


Platform-standard highlighting, as for selected text


The color specified is used.


The system generates a color which is usable for highlighting.

A large cross appears in the Foreground (Background) color area when None , Modified or Default is selected. This indicates that the color is not used for the Foreground (Background).

If you wish to turn off the highlighting of interactive input in the Listener and Shell tools, first select Interactive Input in the Style Name list. Then uncheck all the attributes and click OK .

To restore all styles to those in LispWorks as shipped, click Restore Defaults .

Note: the foreground and background colors of windows are set via the system, not in LispWorks.

The text styles used in syntax coloring have these meanings and default appearance:

Syntax styles

Style Name


Default appearance

Region Highlight

The active region

Native highlight

Show Point

Matching parentheses

:green background

Interactive Input

Input in a Listener or Shell



Editor help such as Describe Bindings



Dynamic and in-place completions. Transient.

Modified background

Search Match

The matching text during an incremental search (as invoked by Ctrl+S)


Line Wrap Marker

Displays the editor's line wrap marker, where a line is wrapped or truncated

:purple foreground, modified background

Lisp Function Name

Name in defun, defmacro, defmethod and defgeneric forms

:blue foreground

Lisp Comment

Comments and feature expressions

:firebrick foreground

Lisp Type

Name in deftype or other def... form, or lambda list keyword such as &optional

:forestgreen foreground

Lisp Variable Name

Name in defvar or defparameter forms

:darkgoldenrod foreground

Lisp String

A string literal

:rosybrown foreground

Lisp Keyword

defun, defmacro or other definer named def...

:purple foreground

Lisp Builtin

A keyword symbol

:orchid foreground

Arglist Highlight

The current argument in a Function Arglist Displayer window

Inverse Controlling parenthesis coloring

You can control whether the editor colors parentheses in Lisp code. By default, pairs of matching parens are displayed in the same color, with a different color for forms at different depths. You can switch off this coloring by deselecting the option Color parenthesis in the Styles tab of the Environment preferences.

3.2.4 Setting the default encodings

The fourth tab under Environment contains the File Encodings options.

The Editor has defaults for the encodings used when opening and saving files. For many users these defaults will suffice. If you need to change either, select the Environment > File Encodings tab of the Preferences dialog.

Figure 3.5 The File Encodings tab of the Preferences dialog

For example, to make the Editor save Carriage Return line-terminated files by default, select CR in the Line Termination Options under Output .

LispWorks IDE User Guide (Macintosh version) - 12 Feb 2015