Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 1: Introduction to Emacs |  | Previous HourNext Hour
Sections in this Hour: |  |

## A Note on Configuring Emacs

You most certainly know now that Emacs is very configurable. You can configure Emacs by inserting Lisp code into the file called .emacs, which is located in your home directory. But don't panic. Throughout this book, you are told every detail about what is to be inserted--you do not have to learn a single line of Lisp.

Windows Notes - In the next hour, "Using Emacs in Microsoft Windows," you will be told the exact location of the .emacs file in Windows because, unlike with UNIX, there is no home directory. You might already want to take a look at the section called "Home" or make a mark in the book at this point so that you can get back and insert the lines that follow.

Throughout this book, you will be told about different extensions to Emacs that are not shipped with Emacs. These extensions are located on the CD as Lisp files. Copy the Lisp files that you would like to use into a directory on your hard disk. One extension is very important--it contain lots of functions that are described throughout this book. Therefore, you need to start right; that is, you need to let Emacs know about this extension.

#### Setting Up Emacs for This Book

Windows Notes - Windows users, you should defer this step until after you read Hour 2. You will make some decisions there that will affect what you do here.

This task tells you how to get Emacs ready for this book. If you do not perform this task, much of the information in this book will not work for you. Follow these steps:

  1. Make a directory, called Emacs, in your home directory. This directory contains all the Lisp files that you want to add to your Emacs setup.

  2. Copy the file /usr/share/emacs-lisp/sams/sams-lib.el from the CD to this directory.

  3. Insert the following lines into your .emacs file:

>     (setq load-path (cons "~/Emacs" load-path))
>     (require 'sams-lib)

  You might need to change ~/Emacs to the correct location of the directory. You can also copy the file /usr/share/emacs-lisp/refcard/refcard.el into this directory, and then modify this file for your keybindings. In this case, insert the following line into your .emacs file (after you have entered the preceding lines).

>     (load "refcard")

These steps ensure that whenever one of the functions from sams-lib.el is described, you do not need to do anything special to load it.

Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 1: Introduction to Emacs |  | Previous HourNext Hour
Sections in this Hour: |  |

© Copyright Macmillan USA. All rights reserved.