Next: , Previous: , Up: Modes   [Contents][Index]

6.1 Major Modes

Emacs has several major modes which customize Emacs to edit text of various sorts. You can have only one major mode at any time. Within each major mode, Emacs redefines certain functions (like cursor movement, indentation and text killing) to suit the needs of the text being edited. When you are editing a specific type of text you should switch to the appropriate mode. If you are working with C code, you should switch to C mode; if you are working with Lisp code, then switch to lisp mode and if you are working with English text switch to Text mode.

When you open a file to work on, Emacs usually selects the appropriate mode. For example, if you open a file called guide.c then Emacs will select the C mode because of the ".c" extension of the file. To explicitly select a mode type the following command:

;;; selects lisp mode
M-x lisp-mode

;;; selects C mode
M-x c-mode

To select any other mode, just add the major mode name before the ’-mode’. The current mode in which you are in will be displayed in parenthesis in the mode-line at the bottom of the frame. All major modes have some special keybindings and you can get a listing of those keybindings by selecting List Keybindings from the Help menu on the menu bar.

Some of the available modes in SXEmacs are :


When you start SXEmacs, usually you start with the default "Fundamental" mode. This mode has no special definitions or settings.


Use this mode when you have to format a text with nroff before it can be available in readable form. It redefines some indentation commands. See Nroff Mode in SXEmacs User’s Manual, for information on this mode.


Use this mode if you are using the LaTeX text-formatter. It provides commands for insertion of quotes, braces and other characters. It also allows you to format the buffer for printing. See TeX Mode in SXEmacs User’s Manual, for information on this mode.


Texinfo is a documentation system that uses a single source file to produce both printed output and on-line documentation. When you use this mode, there will be some special keybindings for inserting some characters and executing some commands.


Use this mode for editing outlines. When you enable this mode, you can make part of the text temporarily invisible so that you can see the overall structure of the outline. See Outline Mode in SXEmacs User’s Manual, for information on this mode.


Use this mode for C programs. It will redefine some indentation commands. See C Indent in SXEmacs User’s Manual.


Use this mode for Lisp programs. Look at the SXEmacs User’s Manual for more information.


Use this mode for Fortran programs. This mode provides special commands to move around and some other indentation commands. For more information on this mode, See Fortran in SXEmacs User’s Manual.


This is the picture mode which you can use to create a picture out of text characters. See Picture in SXEmacs User’s Manual, for more information.

There are some other modes and commands for working with other kinds of text or programs. Emacs also provides commands for reading and sending Mail. For more information on these features look at the SXEmacs Manual. Emacs also provides the functions of a desk calendar, with a diary of past or planned events. For more information on the calendar mode look at the manual for Calendar Mode and Diary.

Next: , Previous: , Up: Modes   [Contents][Index]