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

4 Defining Functions

One of the main reasons you would ever write a emodule is to provide one or more functions for the user or the editor to use. The term function is a bit overloaded here, as it refers to both a C function and the way it appears to Lisp, which is a subroutine, or simply a subr.

A Lisp subr is also known as a Lisp primitive, but that term applies less to dynamic emodules. See Writing Lisp Primitives in SXEmacs Internals Manual, for details on how to declare functions.

Normal Lisp primitives document the functions they define by including the documentation as a C comment. During the build process, a program called make-docfile is run, which will extract all of these comments, build up a single large documentation file, and will store pointers to the start of each documentation entry in the dumped SXEmacs.