[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Loading a file of Lisp code means bringing its contents into the Lisp environment in the form of Lisp objects. Emacs finds and opens the file, reads the text, evaluates each form, and then closes the file.
The load functions evaluate all the expressions in a file just as the
eval-buffer
function evaluates all the expressions in a buffer. The
difference is that the load functions read and evaluate the text in the file
as found on disk, not the text in an Emacs buffer.
The loaded file must contain Lisp expressions, either as source code or as byte-compiled code. Each form in the file is called a top-level form. There is no special format for the forms in a loadable file; any form in a file may equally well be typed directly into a buffer and evaluated there. (Indeed, most code is tested this way.) Most often, the forms are function definitions and variable definitions.
A file containing Lisp code is often called a library. Thus, the “Rmail library” is a file containing code for Rmail mode. Similarly, a “Lisp library directory” is a directory of files containing Lisp code.
15.1 How Programs Do Loading | The load function and others.
| |
15.2 Load Suffixes | Details about the suffixes that load tries.
| |
15.3 Library Search | Finding a library to load. | |
15.4 Loading Non-ASCII Characters | Non-ASCII characters in Emacs Lisp files. | |
15.5 Autoload | Setting up a function to autoload. | |
15.6 Repeated Loading | Precautions about loading a file twice. | |
15.7 Features | Loading a library if it isn't already loaded. | |
15.8 Which File Defined a Certain Symbol | Finding which file defined a certain symbol. | |
15.9 Unloading | How to "unload" a library that was loaded. | |
15.10 Hooks for Loading | Providing code to be run when particular libraries are loaded. |
[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.