left up right

Initializing Emacs

Emacs is a very large program with many options. Not everyone agrees on the default choices for all these options. Emacs will read an initialization file called .emacs when starting.

The emacs dot file is written in a scripting language called Emacs Lisp, or elisp for short. Elisp is a complete Lisp programming environment, with special primitives to handle text editting. Learning elisp for a beginner is too much to ask. Fortunately, you can do a lot in a dot emacs file with just a few basics.

The setq command will set option variables to your custom values. The format of the setq command is ...

    (setq variable value)
Note that setq is surrounded by parenthesis, as common in Lisp commands. The variable is the name of the option variable you wish to set. The value is your desired value. Common values are t (for true), nil (for false), and integer numbers.

Here is an example .emacs file. Comments follow a semi-colon.

(setq rlogin-initially-track-cwd t)	; track dirs in rlogin
(setq next-line-add-newlines nil)	; C-n will not add lines
(setq require-final-newline t)		; require files end with newline
(setq auto-save-default nil)		; don't auto-save (it annoys me)
The Emacs documentation will explain the meaning of any option variables you need to set.
left up right
Author: Jim Weirich / jweirich@one.net
Last modified: Mon Oct 4 22:44:43 EDT 1999
Network Provider: One Net Communications