17. Naming Conventions
The Emacs Lisp programming manual has a great chapter programming
conventions that help keep each Emacs package working nicely with the
entire system. @xref{(elisp)Standards} An EIEIO based program needs to
follow these conventions, while simultaneously taking advantage of the
Object Oriented features.
The below tips are things that I do when I program an EIEIO based
package.
- Come up with a package prefix that is relatively short. Prefix
all classes, and methods with your prefix. This is a standard
convention for functions and variables in Emacs.
- Do not prefix method names with the class name. All methods in
EIEIO are "virtual", and are dynamically dispatched. Anyone can
override your methods at any time. Your methods should be prefixed
with your package name.
- Do not prefix slots in your class. The slots are always locally
scoped to your class, and need no prefixing.
- If your library inherits from other libraries of classes, you
must "require" that library with the
require
command.
This document was generated
by XEmacs Webmaster on October, 2 2007
using texi2html