All Manuals > LispWorks Editor User Guide > 2 General Concepts

NextPrevUpTopContentsIndex

2.3 Modes

Each buffer can be in two kinds of mode : a major mode , such as Lisp mode, or Fundamental mode (which is the ordinary text processing mode); and a minor mode , such as Abbrev mode or Auto-Fill mode. A buffer always has precisely one major mode associated with it, but minor modes are optional. Any number of minor modes can be associated with a buffer.

The major modes govern how certain commands behave. For example, the concept of indentation is radically different between Lisp mode and Fundamental mode. As another example, a Directory mode buffer (which is essentially read-only) lists files and allows you to operate on them with simple keystrokes like E for edit and D for delete. The file listing is updated automatically to reflect any changes.

When a file is loaded into a new buffer, the default mode of that buffer can be determined by the file name. For example, a buffer into which a file name that has a .lisp suffix is loaded defaults to Lisp mode.

The minor modes determine whether or not certain actions take place. For example, when Auto-Fill mode is on, lines are automatically broken at the right hand margin, as the text is being typed, when the line length exceeds a pre-defined limit. Normally the newline has to be entered manually at the end of each line.


LispWorks Editor User Guide (Windows version) - 17 Aug 2017

NextPrevUpTopContentsIndex