NextPrevUpTopContentsIndex

6.3.14 Variables

editor:variable-value

Function

editor:variable-value name &optional kind where

Returns the value of the editor variable name , where name is a symbol. An error is signalled if the variable is undefined. The argument kind can take the value :current , :global or :mode . The default value of kind is :current . The argument where should be the name of a buffer.

For example, the code given below will, by default, return the value :ask-user .

(editor:variable-value 
  'editor::add-newline-at-eof-on-writing-file)

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.

(setf
   (editor:variable-value 
      'editor::add-newline-at-eof-on-writing-file)
    nil)

editor:variable-value-if-bound

Function

editor:variable-value-if-bound name &optional kind where

Returns the value of the variable name . If the variable is not bound, nil is returned. The argument kind can take the value :current , :global or :mode . The default value of kind is :current . Note that where should be the name of a buffer.


LispWorks Editor User Guide (Macintosh version) - 14 Mar 2008

NextPrevUpTopContentsIndex