editor:define-editor-variable name value &optional documentation
Defines an editor variable.
Symbol naming the variable.
The value to assign to the variable.
A string naming a mode.
A documentation string.
defines a global editor variable. There is only one global value, so repeated uses of
overwrite each other.
gives a readable value of defining a variable, and is recognized by the LispWorks source code location system. However variables can also be defined dynamically by calling
. Variable values may be accessed by editor:variable-value.
A variable has only one string of documentation associated with it. editor:variable-value overwrites the existing documentation string, if there is any. You can see the documentation by the command Describe Editor Variable. It can can be accessed programmatically by editor:editor-variable-documentation.
Note: for backwards compatibility
can also be a string, which is converted to a symbol by uppercasing, replacing
, and interning in the EDITOR package. This may lead to clashes and so you should use a symbol for
, not a string.
editor:define-editor-mode-variable name mode value &optional documentation
Defines an editor variable in the specified mode.
A string naming a mode.
As for editor:define-editor-variable.
As for editor:define-editor-variable, except that
installs the documentation only if the editor variable does not already have any documentation.
defines a variable in the specified mode. There is one value per variable per mode.
gives a readable value of defining a variable in a mode, and is recognized by the LispWorks source code location system. However mode variables can also be defined dynamically by calling
. Mode variable values may be accessed by editor:variable-value.
A symbol naming an editor variable.
Returns the documentation associated with the editor variable, if any.
Note: For backwards compatibility a string editor-variable-name is also accepted, as described for editor:define-editor-variable.
editor:variable-value name &optional kind where
Returns the value of the editor variable
is a symbol. An error is signalled if the variable is undefined. The argument
can take the value
. The default value of
(the default, meaning the current buffer) or an editor buffer object or the name of a buffer. The variable value for the specified buffer is returned or (if there is no current buffer) then the global variable value is returned.
can also be
, and then
should be an editor buffer object.
For example, the code given below will, by default, return the value
The value of variables may also be altered using this function. For example, the code given below will allow buffers to be saved to file without any prompt for a missing newline.
editor:variable-value-if-bound name &optional kind where
Returns the value of the variable
. If the variable is not bound,
The arguments are as for editor:variable-value.
editor:buffer-value buffer name &optional errorp
Accesses the value of the editor variable name in the buffer specified by buffer .
name should be a symbol and buffer should be a point object or a buffer object.
If the editor variable is undefined and
is true, an error is signalled. If the variable is undefined and
is returned. The default value of