NextPrevUpTopContentsIndex

3.22.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 a .lisp or .lsp extension. If you have files of source code with extensions other than .lisp or .lsp , however, put the following code in your .lispworks file, substituting the extensions shown for those of your own files:

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

This automatically makes Lisp mode the major mode if you edit any file with a .lisp , .slisp , .el , .lsp , .mcl , or .cl extension.

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.


LispWorks Editor User Guide (Macintosh version) - 23 Feb 2006

NextPrevUpTopContentsIndex