Preferences

The editor, repl, and interaction window each have a Preferences menu that allows the user to configure certain options, such as the font used to display text. Preferences for the editor, repl, or interaction window may be saved across sessions by selecting the Save preferences option from the Preferences menu. Preferences must be saved explicitly for each type of window. For example, saving repl preferences saves only the repl preferences, but does not save any changes to editor preferences since the last time editor preferences were saved.

Local preferences and the .swlprefs file.

At startup, SWL searches for a preferences file named .swlprefs in the current working directory. If no .swlprefs file is found in the current directory, SWL searches in a machine-dependent location. On a Windows machine, SWL uses the value of the registry key HKEY_LOCAL_MACHINE\Software\Chez Scheme\swlversion\SwlPrefsDir, where version is the the SWL version number (bound to swl:version at startup). This registry key is normally set when SWL is installed. On Unix machines, including Mac OS X, SWL looks for the .swlprefs file in the directory specified by the SWL_PREFS_DIR environment variable, if set, or in the user's HOME directory.

To maintain separate SWL profiles, create a new working directory, create an empty .swlprefs file in that directory, and start SWL from that directory. Since SWL finds a .swlprefs file in the current directory, it will not examine your global .swlprefs file, e.g., in your home directory, and changes to preferences will be saved in the local .swlprefs file.

The .swlprefs file is formatted as a Scheme association list, that is, a list of pairs where the car of each pair is a key that be used to retrieve the associated value, which stored in the cdr of that pair. The repl saves its preferences under the key repl, the editor under editor, and the interaction window under interaction-window. In each case, the value is an association. Since these applications can be configured using a Preferences menu, it is better not to edit the .swlprefs file by hand.

System preferences

While the editor, repl, and interaction window maintain application-specific preferences of their own, a few other preferences exist that affect the behavior of SWL system-wide. System-wide options are also stored in the association list contained in the .swlprefs file. The following table describes the keys and the expected values.