The Custom Library
The Custom Library is intended for use by emacs lisp programmers who
want to make their emacs packages easily customizable. It allows the
programmer to
- declare the type for each user option, i.e. specify the set of
legal values for each variable,
- specify and initialize the faces used by the package, and
- organize the user options into groups and hierarchies.
The user will then be able to customize the user options through a
helpful structured interface that resembles the property editor in
modern GUI programs.
Together with Emacs
W3 3.0.51 or later, it also allows people to write interactive
goal oriented tutorials for customizing. A demonstration is available. It works best
after Gnus is loaded.
Version: 1.9962
This is the last unbundled version. You should normally use the
version distributed with Emacs or XEmacs, which will be newer that
this. If you have XEmacs 19.14, XEmacs 20.0 or Emacs 19.34 or earlier,
you emacs will not have a usable version of custom bundled. This
version may or may not work for you. It should work for Emacs 19.34
at least. It will not work with Emacs 20.1 or XEmacs
20.3.
- download
the library. This includes the widget library described below.
- Read the manual.
Warning: This version conflicts with Gnus versions
prior to Red Gnus 0.36. If you want to use both the Custom Library
and Gnus, please upgrade.
If you write software that must work without the new custom, you can
use this hack stolen from w3-cus.el:
(eval-and-compile
(condition-case ()
(require 'custom)
(error nil))
(if (and (featurep 'custom) (fboundp 'custom-declare-variable))
nil ;; We've got what we needed
;; We have the old custom-library, hack around it!
(defmacro defgroup (&rest args)
nil)
(defmacro defface (var values doc &rest args)
(` (make-face (, var))))
(defmacro defcustom (var value doc &rest args)
(` (defvar (, var) (, value) (, doc))))))
History
A prototype of the Custom Library was used by Gnus 5.0 to 5.3 and
included in corresponding Emacs distributions. It did demonstrate the
user interface, but lacked a proper API. Please avoid using this old
version in your software, the new incompatible version is much better,
and is used in Gnus 5.4 and bundled with Emacs in the future.
There is some old documentation available, which was
written before the widget library and is obsolete
now, but still demonstrates the basic design of the new library.
You can find some
older
versions at the main ftp directory.
The Emacs Widget Library
Version: 1.9962
The Emacs Widget Library implements the kind of user interface
components usually found in GUI toolkits within emacs. It is used by
at least two other packages, and is getting close to release quality.
The code is should work with Emacs 19.30 and later, and will work with
XEmacs 19.14 thanks to William Perry <wmperry@cs.indiana.edu>.
As with custom, this version will not work with Emacs 20.1, XEmacs
20.3, or anything newer than that. The widget version bundled with
these emacs versions will be newer that this.
- See an example buffer
containing all the widgets.
- See the code for
implementing the example buffer.
- download the library. If
you download the custom library, you will not need to download this
file too.
- Read the manual.
Contact Info
Bug reports for the widget and custom version bundled with emacs
should go to
<bug-gnu-emacs@prep.ai.mit.edu>
and
<xemacs@xemacs.org>
respectively.
Per Abrahamsen
<abraham@dina.kvl.dk>