|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
XEmacs is a powerful, extensible editor. The traditional way of extending the functionality of XEmacs is to use its built-in Lisp language (called Emacs Lisp, or Elisp for short). However, while Elisp is a full programming language and capable of extending XEmacs in more ways than you can imagine, it does have its short-comings.
Firstly, Elisp is an interpreted language, and this has serious speed implications. Like all other interpreted languages (like Java), Elisp is often suitable only for certain types of application or extension. So although Elisp is a general purpose language, and very high level, there are times when it is desirable to descend to a lower level compiled language for speed purposes.
Secondly, Elisp (or Lisp in general) is not a very common language any more, except for certain circles in the computer industry. C is a far more commonly known language, and because it is compiled, more suited to a wider range of applications, especially those that require low level access to a system or need to be as quick as possible.
This manual describes a new way of extending XEmacs, by using dynamically loadable modules (also known as dynamically loadable libraries (DLLs), dynamic shared objects (DSOs) or just simply shared objects), which can be written in C or C++ and loaded into XEmacs at any time. I sometimes refer to this technology as CEmacs, which is short for C Extensible Emacs.
XEmacs modules are configured into and installed with XEmacs by default on all systems that support loading of shared objects. From a users perspective, the internals of XEmacs modules are irrelevant. All a user will ever need to know about shared objects is the name of the shared object when they want to load a given module. From a developers perspective though, a lot more is provided.
ellccprogram. This program is created during compile time, and is intended to abstract compiler specific characteristics from the developer. This program is called to compile and link all objects that will make up the final shared object, and accepts all common C compiler flags.
ellccalso sets up the correct environment for compiling modules by enabling any special compiler modes (such as PIC mode), setting the correct include paths for the location of XEmacs internal header files etc. The program will also invoke the linker correctly to created the final shared object which is loaded into XEmacs.
The rest of this document will discuss the actual mechanics of XEmacs modules and work through several of the samples. Please be sure that you have read the XEmacs Internals Manual and understand everything in it. The concepts there apply to all modules. This document may have some overlap, but it is the internals manual which should be considered the final authority. It will also help a great deal to look at the actual XEmacs source code to see how things are done.
|[ << ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|