The commands described below allow the user to evaluate (interpret) or compile Lisp code that exists as text in a buffer. In some cases, the code may be used to modify the performance of the Editor itself.
If non-nil, defines the value of the current package.
Argument:
package
Key sequence: None
Set the package to be used by Lisp evaluation and compilation while in this buffer. Not to be used in the Listener, which uses the value of *package*
instead.
Argument:
stream
Key sequence: None
Sets the output stream that evaluation results in the current buffer are sent to.
Argument: None
Key sequence: Alt+Ctrl+X
Evaluates the current top-level form. If the current point is between two forms, the previous form is evaluated.
If the form is a defvar
form, then the command may first make the variable unbound, according to the value of evaluate-defvar-action, and hence assign the new value. This is useful because cl:defvar
does not reassign the value of a bound variable but when editing a program it is likely that you do want the new value.
Default value: :reevaluate-and-warn
This affects the behavior of Evaluate Defun and Compile Defun when they are invoked on a defvar
form. The allowed values are:
Do not make the variable unbound before evaluating the form, and warn that it was not redefined.
Do not make the variable unbound before evaluating the form, but do not warn that it was not redefined.
Make the variable unbound before evaluating the form, and warn that it was therefore redefined.
Make the variable unbound before evaluating the form, but do not warn that it was therefore redefined.
Argument: None
Key sequence: None
Evaluates the current top-level form if it is a defvar.
If the current point is between two forms, the previous form is evaluated. The form is treated as if the variable is not bound.
Re-evaluate Defvar
is a synonym for Reevaluate Defvar
.
Argument:
expression
Key sequence: Esc Esc
expression
Key sequence: Alt+Esc
expression
Evaluates expression. The expression to be evaluated is typed into the Echo Area and the result of the evaluation is displayed there also.
Argument: None
Key sequence: Ctrl+X Ctrl+E
Evaluates the Lisp form preceding the current point.
Without a prefix argument, prints the result in the Echo Area. With a non-nil prefix argument, inserts the result into the current buffer.
Argument: None
Key sequence: Ctrl+Shift+E
Evaluates the Lisp forms in the region between the current point and the mark.
Argument: None
Key sequence: None
Evaluates the Lisp forms in the current buffer.
Argument:
file
Key sequence: None
Loads file into the current eval server, so that all Lisp forms in the file are evaluated.
Argument: None
Key sequence: None
Toggles error catching for expressions evaluated in the editor. By default, if there is an error in an expression evaluated in the editor, a Notifier window is opened which provides the user with a number of options, including debug, re-evaluation and aborting of the editor command. However, this behavior can be changed by using Toggle Error Catch
, so that in the event of an error, the error message is printed in the Echo Area, and the user is given no restart or debug options.
Evaluate Buffer Changed Definitions
Argument: None
Key sequence: None
Evaluates definitions that have been changed in the current buffer during the current LispWorks session (use Buffer Changed Definitions on Buffer Changed Definitions to see which definitions have changed). A prefix argument equal to the value of prefix-argument-default causes evaluation of definitions changed since last evaluated. A prefix argument of 1 causes evaluation of definitions changed since last saved.
Argument: None
Key sequence: None
Evaluates definitions in all Lisp buffers that have been changed during the current LispWorks session. The effect of prefixes is the same as for Evaluate Buffer Changed Definitions.
Evaluate System Changed Definitions
Argument:
system
Key sequence: None
Evaluates definitions that have been changed in system during the current LispWorks session.
Argument:
editp
Key sequence: None
This command works rather like Evaluate Defun in that it evaluates the current top-level form and handles defvar
forms usefully. However, instead of doing the evaluation in the Editor window, it copies the form into a Listener window as if you had entered it there.
Normally the evaluation is done immediately, but if a prefix argument is given, the text is inserted into the Listener for you to edit before pressing Return
to evaluate it.
An in-package
form is inserted before the form when necessary, so this will change the current package in the Listener.
Evaluate Last Form In Listener
Argument:
editp
Key sequence: None
This command works rather like Evaluate Last Form in that it evaluates the Lisp form preceding the current point. However, instead of doing the evaluation in the Editor window, it copies the form into a Listener window as if you had entered it there.
Normally the evaluation is done immediately, but if a prefix argument is given, the text is inserted into the Listener for you to edit before pressing Return
to evaluate it.
An in-package
form is inserted before the form when necessary, so this will change the current package in the Listener.
Argument:
editp
Key sequence: None
This command works rather like Evaluate Region in that it evaluates the Lisp forms in the current region. However, instead of doing the evaluation in the Editor window, it copies the forms into a Listener window as if you had entered them there.
Normally the evaluation is done immediately, but if a prefix argument is given, the forms are inserted into the Listener for you to edit before pressing Return
to evaluate them.
An in-package
form is inserted before the forms when necessary, so this will change the current package in the Listener.
Argument: None
Key sequence: Ctrl+Shift+C
Compiles the current top-level form. If the current point is between two forms, the previous form is evaluated.
If the form is a defvar
form, then the command may first make the variable unbound, according to the value of evaluate-defvar-action, and hence assign the new value.This is useful because cl:defvar
does not reassign the value of a bound variable but when editing a program it is likely that you do want the new value.
Argument: None
Key sequence: Ctrl+Shift+R
Compiles the Lisp forms in the region between the current point and the mark.
Argument:
file
Key sequence: None
Compiles file unconditionally, with cl:compile-file
.
No checking is done on write dates for the source and binary files, to see if the file needs to be compiled. Also, no checking is done to see if there is a buffer for the file that should first be saved.
Argument: None
Key sequence: Ctrl+Shift+B
Reads, compiles and then executes in turn each of the Lisp forms in the current buffer.
Argument: None
Key sequence: None
Compiles the source file in the current buffer as if by Compile File, but checks the buffer and file first.
If the buffer is modified it is saved (updating the source file) before compilation, although if compile-buffer-file-confirm is true the command prompts for confirmation before saving and compiling.
If its associated binary (fasl) file is older than the source file or does not exist or the prefix argument is supplied then the file is compiled, although if compile-buffer-file-confirm is t
the command prompts for confirmation before compiling.
If the binary file is up to date, command prompts for confirmation before compiling, although this prompt can be avoided by supplying the prefix argument.
Arguments: None
Key sequence: None
The command Compile and Load Buffer File
compiles the source file in the current buffer just like Compile Buffer File, with the same checks.
It then loads the compiled file. In the case that the binary file is up to date and the user declines to compile, the command first prompts for confirmation before loading the existing binary file.
Arguments:
filename
Key sequence: None
The command Compile and Load File
prompts for a filename, and then compiles and loads that file.
Determines whether
Compile Buffer File should prompt for a compilation to proceed. If the value is true, the user is always prompted for confirmation.
Compile Buffer Changed Definitions
Argument: None
Key sequence: None
Compiles definitions that have been changed in the current buffer during the current LispWorks session (use Buffer Changed Definitions to see which definitions have changed). A prefix argument equal to the value of prefix-argument-default causes compilation of definitions changed since last compiled. A prefix argument of 1 causes compilation of definitions changed since last saved.
Argument: None
Key sequence: None
Compiles definitions in all Lisp buffers that have been changed during the current LispWorks session. The effect of prefixes is the same as for Compile Buffer Changed Definitions.
Argument:
system
Key sequence: None
Compiles all files in the system system.
If ASDF is loaded and the LispWorks tools are configured to use it, then this command works with ASDF systems as well as those defined by lispworks:defsystem
.
Compile System Changed Definitions
Argument:
system
Key sequence: None
Compiles definitions that have been changed in system during the current LispWorks session.
Argument:
definition
Key sequence: None
Outputs assembly code for definition to the Output window, compiling it first if necessary. The name of the current top-level definition is offered as a default value for definition .
Argument: None
Key sequence: Ctrl+X ,
Edit the source of the next compiler message, warning or error. It should be used while viewing the Output window. Without a prefix argument, it searches forwards in the Output window until it finds text which it recognizes as a compiler message, warning or error, and then shows the source code associated with that message. With a prefix argument, it searches backwards.
LispWorks Editor User Guide (Windows version) - 17 Aug 2017