All Manuals > Release Notes and Installation Guide > 12 Release Notes

12.9 Editor changes

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 Editor User Guide for details of these changes. This section is not relevant to LispWorks for Mobile Runtime.

12.9.1 Lax whitespace matches

Search commands in the Editor can now be configured to search for whitespace in a "lax" way like in GNU Emacs. This means that any sequence of spaces in the search string will match any consecutive whitespace in the text.

The new editor variables editor:isearch-lax-whitespace, editor:isearch-regexp-lax-whitespace, editor:replace-lax-whitespace and editor:replace-regexp-lax-whitespace control the default state of lax whitespace matching in various operations.

For incremental searches, you can toggle between lax and exact whitespace matching for the current operation by typing Meta-s #\Space.

The new editor variable editor:search-whitespace-regexp contains the regexp used to match whitespace in lax mode.

12.9.2 Unique buffer names based on the directory of the file

When you open more than one file with a given name but in different directories, the editor has to ensure that the buffers have unique names. In previous releases, the first buffer was named after the file and subsequent buffers were named after the file with an additional suffix <n>, where n was 2, 3, 4 etc.

In LispWorks 8.0, the editor still uses the name of the file is that is unique and otherwise renames all buffer with conflicting names to be unique. By default, the unique buffer name has a suffix <dirs> where dirs includes enough of the directory name to make it unique.

The new function editor:set-buffer-name-directory-delimiters can be used to control how the buffer name is adjusted for files that have the same name, or switch back to the numerical suffix used in previous releases.

12.9.3 Definition folding

The editor now supports "definition folding", which means making the body of a definition invisible, as well as the preceding lines up to the previous definition, Currently the implementation applies only to Lisp definitions. A line starting with an open bracket is regarded as the begining of a Lisp definition, and the matching closing bracket is its end. The folding only affects the way the text in the buffer is displayed on the screen, and have no effect on the buffer contents.

The new editor commands The new editor commands Fold Buffer Definitions, , Unfold Buffer Definitions and and Toggle Current Definition Folding change the definition folding of the current buffer.

12.9.4 Indentation of loop

Uses of the extended loop form are now indented by the Editor based on the clause structure. For example:

(loop for index below 10
      when (foo index)
        do (print index))

12.9.5 Control how files are loaded

The new function editor:set-pathname-load-function allows you to set a specific function that will be called when loading files with a given type using the Editor command allows you to set a specific function that will be called when loading files with a given type using the Editor command Load File and the File > Load menu item in the LispWorks IDE.

12.9.6 Reverting a buffer with a different external format

Sometimes the editor uses the wrong external format when you open a file. The new editor command Sometimes the editor uses the wrong external format when you open a file. The new editor command Revert Buffer With External Format allows you to reopen the file after selecting a specific external format.

12.9.7 Toggling between the main and Output tabs in a Listener or Editor

The editor command The editor command Invoke Tool can now be used to toggle between the main and Output tabs in a Listener or Editor by using the character for the tool itself (l or e respectively).

12.9.8 Editor Ctrl+[ and Ctrl+] key bindings in Windows emulation mode

When Editor key are like Microsoft Windows, menu bar via Alt key is checked in the Environment > Emulation preferences, the keyboard shortcuts Ctrl+[ and Ctrl+] now perform Beginning of Defun and End of Defun respectively.


Release Notes and Installation Guide - 01 Dec 2021 19:38:49