When you first start up the editor, the first thing you must do is open a file.
Use file extensions .lisp
or .lsp
for Common Lisp files. The editor recognizes these extensions and places the buffer in Lisp mode. Lisp mode provides special features for use in Lisp editing.
You can create a new Lisp buffer by choosing File > New . The new file is automatically in Lisp mode, and the buffer is called "Unnamed". As soon as you try to save this buffer, the editor prompts you for a filename.
As you have already seen, you can open an existing file by choosing File > Open . A dialog appears from which you can select a file to edit.
To save a file, choose File > Save . If the file has not been saved before (that is, if you created the file by choosing File > New and this is the first time you have saved the file), you are prompted for a directory and a filename.
You can also save a file by using the keyboard command Ctrl+X Ctrl+S
.
If you want to make a copy of the file (save the file under a different name) choose File > Save As and specify a name in the dialog that appears.
Choose File > Revert to revert back to the last saved version of the file. This replaces the contents of the current buffer with the version of that file which was last saved on disk. This command can be useful if you make a number of changes which you want to lose.
As well as saving whole files to disk, you can save any part of a file to disk under a different filename. To do this:
Note that the selected text is copied into the new file, rather than moved; it is still available in the original buffer.
To find out more about selecting regions of text, see Marking the region. To find out more about operating on regions of text, see Using Lisp-specific commands.
To print the file in the current buffer to your default printer, choose File > Print . The printer on which your hard copy appears can be changed or configured by choosing the File > Printer Setup... menu option.
Used to hold the command used by Common Lispworks for all printing operations.
Initial Value: Initially, this variable is unbound.
This variable is used as the command sent by Common LispWorks to the shell in all printing operations. For example, it is used by the Editor command M-x Print Buffer
and lw:hardcopy-system
.