NextPrevUpTopContentsIndex

3.23.1 Major modes

The major modes govern how certain commands behave and how text is displayed. Major modes adapt a few editor commands so that their use is more appropriate to the text being edited. Some movement commands are affected by the major mode, as word, sentence, and paragraph delimiters vary with the mode. Indentation commands are very much affected by the major mode Indentation.

Major modes available in the LispWorks editor are as follows:

The major mode of most buffers may be altered explicitly by using the commands described below.

By default, Lisp mode is the major mode whenever you edit a file with type lisp (as with several other file types). If you have Lisp source code in files with another file type foo , put a form like this in your .lispworks file, adding your file extension to the default set:

(editor:define-file-type-hook 
	("lispworks" "lisp" "slisp" "l" "lsp" "mcl" "cl" "foo")
	(buffer type)
	(declare (ignore type))
	(setf (editor:buffer-major-mode buffer) "Lisp"))

Fundamental Mode

Editor Command

Arguments: None
Key sequence: None

Puts the current buffer into Fundamental mode.

Text Mode

Editor Command

Arguments: None
Key sequence: None

Puts the current buffer into Text mode.

Lisp Mode

Editor Command

Arguments: None
Key sequence: None

Puts the current buffer into Lisp mode. Notice how syntax coloring is used for Lisp symbols. Also the balanced parentheses delimiting a Lisp form at or immediately preceding the cursor are highlighted, by default in green.


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

NextPrevUpTopContentsIndex