Next: Display Conventions, Previous: The Prefix Argument, Up: Introduction [Contents][Index]
A mode provides a way to change Hemlock’s behavior by specifying a modification to current key bindings, values of variables, and other things. Modes are typically used to adjust Hemlock to suit a particular editing task, e.g. Lisp mode is used for editing LISP code.
Modes in Hemlock are not like modes in most text editors; Hemlock is really a “modeless” editor. There are two ways that the Hemlock mode concept differs from the conventional one:
A major mode is used to make some big change in the editing environment. Language modes such as Pascal mode are major modes. A major mode is usually turned on by invoking the command mode-name Mode as an extended command. There is only one major mode present at a time. Turning on a major mode turns off the one that is currently in effect.
A minor mode is used to make a small change in the environment, such as automatically breaking lines if they get too long. Unlike major modes, any number of minor modes may be present at once. Ideally minor modes should do the “right thing” no matter what major and minor modes are in effect, but this is may not be the case when key bindings conflict.
Modes can be envisioned as switches, the major mode corresponding to one big switch which is thrown into the correct position for the type of editing being done, and each minor mode corresponding to an on-off switch which controls whether a certain characteristic is present.
This command puts the current buffer into Fundamental mode. Fundamental mode is the most basic major mode: it’s the next best thing to no mode at all.
Next: Display Conventions, Previous: The Prefix Argument, Up: Introduction [Contents][Index]