I've tried to split exmh into meaningful modules,
separating display modules (fdisp, for instance) from those
that maintain display-independent data structures
(like flist). Features like the Find
and Pick dialogs are in their own file, so you can easily
replace those. I have not documented the interfaces between
modules at all, so you'll have to read some code. It's easy to
find definitions: the .tcl file names reflect the names of
the procedures that they define. In addition, many modules use a
global array to hold their state variables; this array variable
has the same name as the module.
If you are really interested in the internals of exmh (that
is, if something about it really bugs you!), you can look into the
implementation to see what is wrong and how you might do things
better. The following sections contain a list of the files that
make up exmh and short explanations of the Tcl procedures
The sources are divided into two parts. The main scripts
include exmh and some associated utility scripts. The files
with the .MASTER suffix are patched with site-dependent
information before they are installed. The remaining sources are
kept in a script library. The library files are loaded on demand
by the Tcl auto_load facility.
This is the main script. It gets patched with site-dependent
information, and the results are written to exmh, which
exmh.MASTER doesn't define much because it loads almost
everything from the script library.
This is the main script for the background process. It redefines
a few procedures and loads the rest of its implementation from
the library. The initial rendezvous between the background
process is implemented in this script and in some supporting
routines in background.tcl.
These are supporting routines for the installation process. This
should be generic enough for use with your own Tcl application.
Feel free to borrow it.
The remainder of the files are kept in the script library.
A browser for the MH alias file.
The background processing module. This can run in a separate
process or as part of the main process. The BgRPC
routine is used to invoke a background operation, and it works
in either case.
The default bindings and the implementation of the binding user
Three different ways to indicate that exmh is busy doing
The resource-based button and menu implementation.
A stub for the C cutbuffer extension. If you have added the
extension to your wish, you'll have slightly better
cut-and-paste interoperability with older X programs.
The interface to editors for message composition.
The error handler.
This has Init routines for optional modules. The idea is to
avoid loading the modules until they are actually used.
The main window display is set up here. The code that remembers
where top-level windows go is here.
The interface to the faces database.
The folder cache display.
The main folder display.
The color definitions for the folder display.
The nested folder popup implementation.
The file selection dialog.
The find dialog.
Manages the appearance of the icon.
Manages the set of unseen folders.
Folder operations like Folder_Change
The folder-create and -delete dialogs.
The folder table of contents (scan listing).
Color definitions for the highlights in the table of contents.
Routines that search over the table of contents.
Some very simple help text and a color key.
Routines to import folders from UCB mail.
Several ways to incorporate mail.
There are three labels in the display -- can you see them?
Routines to parse the MIME mailcap files.
The main Exmh procedure, plus Exmh_Status
A basic layer on top of the MH commands.
The MIME display code.
Message operations -- although these tend to be distributed
partly among ftoc.tcl and mh.tcl as well.
This used to be the main message display code, but it has become
dwarfed by the MIME display.
An interface to the Pretty Good Privacy system.
An interface to the MH pick program.
The Preferences user interface.
Routines to print messages.
This parses text/enriched MIME contents.
This manages the scan caches.
The main routines for the built-in editor.
The keybindings for the built-in editor.
The table of compose key sequences that insert 8-bit characters
is defined here.
Implements the composition of text/enriched.
More editor stuff,
like Whom, Spell, Sign,
Find, and the dialogs associated with Insert
Implements the MIME multipart structuring.
Support for quoted-printable encoding of outgoing
Implements the keyboard selection of folders and messages.
Some text tagging routines.
An implementation of a pseudo-button in a text widget. This used
to be part of the MIME display code but is no longer used.
The main guts of text bindings.
Stubs for User_Init and User_Layout.
Support for the popup menus used in MIME messages.
Handles constrained text scrolling and dragging a selection off
A basic layer on top of the Tk widgets. These routines integrate
the pack geometry manager. Even more important, they guard
against errors that occur because of missing fonts. You should
try to use these instead of the straight Tk widget commands.
An interface to xnsgetmail for those folks with mail on
an XNS mail server.