This section describes new features and other changes in the LispWorks editor, which is used in the Editor tool of the LispWorks IDE.
See the LispWorks Editor User Guide for details of these changes.
The editor now supports the entire Unicode range, and provided that the system has suitable fonts it should be able to display all the characters correctly.
Note that external format :unicode
now maps to UTF-16 rather than UCS-2. UTF-16 is quite likely to give an error trying to read a binary file. See "Unicode and other file encodings" in the
LispWorks Editor User Guide
for the recommended approach.
Use strings (rather than characters with bits, which are no longer supported) to define LispWorks Editor key sequences with modifiers, like this:
(editor:bind-key "Show Documentation" "Meta-Control-A")
(editor:bind-key "Search Examples" #("Control-x" "%"))
A buffer in Directory mode lists files and allows you to easily edit any of them, copy or move some of them to another directory, or delete some of them. It also makes it easy to keep a record of which files you already edited.
Create a Directory mode buffer by the new List Directory
command (Ctrl+X D
in Emacs emulation) or one of the other methods described in the guide section "Directory mode".
The function editor:clear-undo
is now exported and documented. It clears any undo information in an editor buffer.
In LispWorks 6.1 and earlier versions the only exported way to clear undo information was the editor command Clear Undo
. However, this command has changed behavior as described in Clear Undo command prompts.
The editor command Clear Undo
now prompts the user for confirmation.
Programmatic use (for example as editor:clear-undo-command
or via capi:call-editor
) can be replaced by the function editor:clear-undo
.
The new editor command Un-Kill As String
inserts text from the kill ring as a Lisp string, surrounded by double-quotes.
The new editor command Un-Kill As Filename
inserts the namestring of the current buffer's pathname, first converting any backslash characters to forward slash so that it does not need to be escaped in a Lisp string.
The new editor command Save Buffer Pathname
pushes the namestring of the pathname of the current buffer onto the kill ring. This can then be inserted elsewhere by commands such as Un-Kill
and Un-Kill As Filename
.
The new editor command Find Source For Current Package
finds the defpackage
definition for the package at the current point. If a prefix argument is given, it first prompts for a package name.
The new commands Code Coverage Current Buffer
, Code Coverage File
, Code Coverage Load Default Data
and Code Coverage Set Default Data
allow you to visualize code coverage data in the LispWorks editor.
The functions hcl:code-coverage-set-editor-colors
and hcl:code-coverage-set-editor-default-data
allow you to control how the editor displays code coverage data, and which data it displays.
See Code Coverage for information about the new Code Coverage interface.
The replacement string used by the commands Replace Regexp
and Query Replace Regexp
can now contain \d
where d
is a digit to specify replacement by matching of \(
and \)
pairs.
The function editor:regular-expression-search
can now return a vector specifying the matches of \(
and \)
in the pattern.
Editor commands such as Directory Search
and System Query Replace
now recognize files with type "cpp" as source files, and operate on them by default.
editor:append-file
is now renamed as editor:append-region-to-file
and editor:write-file
is now editor:write-region-to-file
.
These new names are clearer, and also avoid a clash with lw:append-file
.
LispWorks Release Notes and Installation Guide - 2 Mar 2015