GNU Info

Info Node: (emacs-lisp-intro.info)Writing Defuns

(emacs-lisp-intro.info)Writing Defuns


Next: Buffer Walk Through Prev: Practicing Evaluation Up: Top
Enter node , (file) or (file)node

How To Write Function Definitions
*********************************

   When the Lisp interpreter evaluates a list, it looks to see whether
the first symbol on the list has a function definition attached to it;
or, put another way, whether the symbol points to a function
definition.  If it does, the computer carries out the instructions in
the definition.  A symbol that has a function definition is called,
simply, a function (although, properly speaking, the definition is the
function and the symbol refers to it.)

Primitive Functions
defun
The `defun' special form.
Install
Install a function definition.
Interactive
Making a function interactive.
Interactive Options
Different options for `interactive'.
Permanent Installation
Installing code permanently.
let
Creating and initializing local variables.
if
What if?
else
If--then--else expressions.
Truth & Falsehood
What Lisp considers false and true.
save-excursion
Keeping track of point, mark, and buffer.
Review
defun Exercises

automatically generated by info2www version 1.2.2.9